Spray a fabric-safe refresher formulated to remove odors on your shirt. Mist the shirt only, do no saturate it. This is a quick fix that may allow you to wear your shirt right away, especially if it only has slight odor.
Put your shirt and other musty-smelling laundry in the washer and set it to the rinse cycle. Then, dry them immediately in the dryer on the highest setting recommended on the care labels.
Launder your shirt and other laundry again with your regular laundry detergent if they still smell. Iowa State University recommends adding 1/2 cup of color-safe powdered bleach or water conditioner to the wash to help get rid of sour odors.