I have to do my homework by tomorrow.

Literal

Tomorrow [by-までに] homework [object-を] must.

宿題をしなければならない is a standard obligation statement. までに marks the deadline. A textbook example sentence.