Seek out areas and sources of moisture in your basement. There could be seepage from the ground, drainage issues or condensation. If necessary, contact a professional contractor or mason to assist you with identifying moisture problems. If the problem involves seepage or drainage, have the basement repaired prior to painting.
Dry out the basement as best you can with a dehumidifier. Damp basements with condensation issues benefit from having a dehumidifier running on a regular schedule.
Scrape any old paint off the basement wall that you'll be painting. For walls without paint, clean off any mildew, grease or dirt with a heavy-duty sponge and an all-purpose cleaner.
Apply drylock or another kind of masonry waterproofing paint per manufacturer's instructions. Use a paint roller for ease of application. Drylock paint will work on a slightly damp wall, but not on a wet one.