Formal:
* Il faut que je fasse mes devoirs. (This is the most literal translation, meaning "It is necessary that I do my homework.")
* Je dois faire mes devoirs. (This is a more direct way of saying "I must do my homework.")
Informal:
* Je suis obligé(e) de faire mes devoirs. (This means "I am obligated to do my homework.")
* J'ai besoin de faire mes devoirs. (This means "I need to do my homework.")
* Je dois finir mes devoirs. (This means "I have to finish my homework.")
You can also use a more idiomatic expression like:
* Je suis coincé(e) avec mes devoirs. (This means "I'm stuck with my homework.")
The best option for you will depend on the context of the situation.