I have an H1b visa and I also have a brother who is a US citizen. Can my brother petition me for a green card? If my visa expired before the filed petition is granted can I still stay in the US?
You should speak to a qualified immigration lawyer about the exact nature of your options.
While your U.S. citizen brother can file a petition for you, such a petition should be treated as a "safety net" or "fall-back" rather than a primary immigration strategy - in the short run, it isn't likely to do you much good. A petition of a citizen for an adult sibling is considered family fourth preference. This means a very, very VERY long waiting time for an available immigrant visa in this category. Depending on your country of birth, immigrant visas are backlogged between eleven and twenty three years right now.
You won't be able to stay here while waiting for approval of your brother's immigrant visa petition or for for the approved immigrant visa petition in this category to become current, as you would with an employment-based immigrant visa petition filed before the end of your fifth year of H-1B time.
So, while there may be no harm in going forward with such a petition, you should speak with an attorney about what other (quicker/more realistic) options might be available to you.