The short answer is "maybe". The answer depends on the basis for denial in the first case.
If USCIS determined that the first marriage was a "sham marriage", then that finding has poisoned the well. A sham marriage is a bar to any other immigration benefits. You must overcome that finding, when prosecuting the second case with evidence that the marriage was not a "sham". The best evidence of a good faith marriage is proof of commingled finances, evidence of cohabitation, and children born of your marriage.
The second relationship will also be scrutinized under the same standard.
Work with experienced immigration counsel to provide thorough evidence for both marriages and overcome the original basis for denial. Immigration law is a federal practice and we can assist you if you are unable to find competent local counsel.
You do not state in your post the reason that your first marriage application was denied. If USCIS made a determination that it was a fraudulent marriage, then you may not be able to file a new petition if you re-marry. You should definitely consult with an immigration attorney who will need to review your entire immigration history, along with the case that was filed with USCIS with your first husband, the denial and the appeal. Once an immigration attorney reviews this, he/she will be able to advise you regarding your options and rights at this point.
Please note that content of this reply does not constitute legal advice or create an Attorney/Client relationship in the absence of an agreement for legal services/retainer with my office. This is just a place to start in deciding what to ask your lawyer.