According to Mrs. Clean, getting rid of a musty smell in the basement involves removing or repairing the specific problems causing the smell and cleaning the area to reduce current smells and prevent future ones. Remember that deodorizers and air fresheners merely disguise the smell and are not a substitute for fixing the real problem.
Many people often do not see what is causing the smell in their basement. Things causing this smell may include grime, cobwebs, and even rodent infestation. The first step towards identifying a particular problem is to give the basement a cleaning from the top down. Use bleach, borax, and vinegar to clean surfaces and behind each item, and remove clutter as well as anything that absorbs moisture.
Start this cleaning from the ceiling and work down to the rest of the basement. Use a dehumidifier and open any windows in order to dry the moisture of the basement out. Repair anything causing water to leak into the area. Bring in a personal heater to the basement and either turn on lights or open the window to further evaporate water and deny mildew the darkness it needs to spread. Use borax to clean any visible molds or fungus. Make these fixes permanent to keep the basement from becomingly overly smelly in the future.