No. ESTA only needs to be valid at the time you enter the United States.
If your ESTA expires while you are in the U.S., it will not affect your departure.
However, you must apply for a new ESTA if you plan to enter the United States again in the future.