As in all states it is illegal to drive with an expired driver's license in Massachusetts. You are technically driving without a valid driver's license until you renew your license and once again make it valid.
From the information we could find it appears that one penalty for driving with an expired license is a fine. To be certain though what your penalties will be, if you were ticketed for this law violation, check with the court listed on the citation or the MA Registry of Motor Vehicles. We have read that the fine amount is normally around $100.
Driving without a license, which you may have been cited for since your license was expired and thus not technically valid, can be considered a criminal offense in Massachusetts. Massachusetts General Laws Chapter 90 Section 10 discusses this offense. Penalties are not mentioned here though.
The MA driver's manual however states you may face a considerable fine and/or jail sentence, as well as additional suspension sanctions if you drive without a license or on a suspended or revoked license.
You may want to contact the MA RMV to see if about how to renew your expired driver's license and if you are able to do so then contact the court on your ticket, if you were cited for this offense, to see if renewing your license before the court date for driving with an expired license will help you. You may see if the ticket can be dismissed if you have a valid license by the court date and can show it to the court.