For other uses, see Codeine (disambiguation). Codeine is an opiate used to treat pain, as a cough medicine, and for diarrhea. It is typically used to treat mild to moderate degrees of pain. Greater benefit may occur when combined with paracetamol (acetaminophen) or a nonsteroidal anti-inflammatory drug (NSAID) such as aspirin or ibuprofen.