BACKGROUND: The quality of medicines available in some less-developed countries is inadequate in terms of content of active ingredient. Reasons for the poor quality of drugs include widespread counterfeiting of medicines in less-developed countries, excessive decomposition of active ingredient as a result of high temperature and humidity, and poor quality assurance during the manufacture of medicinal products. Our aim was to investigate the quality of different drugs obtained from retail pharmacies in two urban areas of Nigeria, and, in instances of poor quality, to ascertain the reason why. METHODS: We randomly collected 581 samples of 27 different drugs from 35 pharmacies in Lagos and Abuja in Nigeria. We analysed the medicines for drug content by validated chromatographic methods, and compared our results with pharmacopoeial requirements. FINDINGS: 279 (48%) samples did not comply with set pharmacopoeial limits, and this proportion was uniform for the various types of drugs tested. Although some preparations contained no active ingredient, most had amounts just outside the pharmacopoeial limits. We identified samples with both too much and too little active drug content. INTERPRETATION: The most probable cause of the poor quality of drugs is absence of adequate quality assurance during manufacture. Substandard drugs sold in the pharmacies of less-developed countries could contribute to global microbial resistance and therapeutic failure of infectious diseases.