Mildew loves a damp and warm habitat. This means that the insole of your shoe is a perfect place for mildew, and the accompanying bad odor. Mildew odor is slightly different from shoe odor caused by perspiration, but is just as bad. Anytime shoes get damp and aren't dried quickly and thoroughly — such as shoes stored in humid locker rooms, or shoes that have been drenched with rain but left to dry too slowly — the shoes may develop this smell. Getting rid of the odor is simple: kill the mildew.
Remove insoles if possible and set them aside. If you had added additional insoles to the shoes for extra cushioning, you should throw these out and get new ones. For other insoles, allow them to dry and them spray them with a disinfectant/anti-fungal spray.
Undo the laces to open the shoe as much as possible. If the shoe is still damp, dry it with a hair dryer. To do this, set a hair dryer on high and direct the nozzle towards the inner areas of the shoe.
Spray a disinfectant spray inside the shoe. Make sure the spray gets all the way to the inner toe areas. You can do this easier by holding the shoe vertically, toe pointed down and spraying directly down into the shoe.
Set the shoes down on the floor or a table to dry overnight. In the morning, check the shoes for remaining odor. If any hint of bad odor remains, spray them again. Wait until the disinfectant spray dries before wearing the shoes.