Your passport is important, but not so important as your chance to become legal. Many people who overstay legalize their status --and they never renew their passport. You can do this. Please contact an attorney to help you get this done soon. Good luck.
This is general advice, and does not constitute an attorney client relationship.
Your ability to get a passport is controlled by your country's regulations. You should contact your local country's Consulate or Embassy in US and ask for their process. This is regularly done for aliens within the US and should not result in any issue being brought forward.
Legal disclaimer: The statement above is provided by CC Abbott is based on general assistance and not intended to be a legal opinion because not all the facts are provided. The person requesting information and all others reading the answer should retain an attorney who is permitted by the state bar within the jurisdiction who can examine the complete facts and provide a legal opinion on your case. All information provided in the above answer and other information provided by CC Abbott does not create an attorney/client relationship within any state of Federal law.
In addition to Mr. Abbott's comments that you may be able to renew your passport from within the United States, you asked if it is necessary to have a valid passport to adjust status. Some immigration officers do prefer there to be a valid passport at the time of the interview and will request it, but the law does not require that your passport be valid at the time of your adjustment.
Of course, you likely will need some kind of valid photo identification to complete the biometrics process (fingerprints and photos). Do you have other photo identification that is valid? If not, trying to renew your passport through your country's nearest consulate/embassy in the United States may be the best option to obtain the needed identification document.
Ms. Doerrie's answer to your question is general in nature, as not all facts and circumstances relating to the specific person(s) and situations involved are known to her. Ms. Doerrie recommends consulting with an immigration attorney regarding your specific facts and circumstances prior to making any legal decision or submitting any form or application. This response does not create an attorney/client relationship.
So long as you still have the passport you used to enter the US, with the proof of your legal entry, you should be able to apply for adjustment of status. You will need to have a valid passport at the time of the interview, so you should check with your country's consulate as to either getting your old passport renewed or getting a new one issued. In no case should you lose or give up the old passport.
This answer is of a general nature and should not be relied upon as final, nor is it intended as legal advice. A consultation with an experienced attorney is always the best way to go.
Your spouse will need to petition you and will file for adjustment of status with proof of your legal entry.
For your passport questions, you need to contact the Embassy of your country.
You should retain an experienced immigration lawyer to review all the facts and advise you accordingly.
J Charles Ferrari Eng & Nishimura 213.622.2255 The statement above is general in nature and does not constitute legal advice, as not all the facts are known. You should retain an attorney to review all the facts specific to your case in order to receive advise specific to your case. The statement above does not create an attorney/client relationship.