I wanna go back to my home country at the end of my 6 months stay, I'm on B2 visa. Will I be able to come back two weeks later?

I married US citizen during my stay, but didn't apply for a green card. Is the short amount of time between two entry going to be a problem? Or does marrying a US citizen makes my B2 visa invalid? Thanks!

The marriage does not invalidate your B2 but if questioned at the point of entry regarding the frequent trips, you will have to tell the truth. If the officer suspects that you have the intent to remain permanently, I wouldn't be surprised if he/she sends you back home.

This answer is for informational purposes only and should not be construed as legal advice.