 After subjects have provided informed consent, they will enter a 1 week screening phase during which medical, psychiatric, and substance use measures and assessments will be administered to determine study eligibility. At baseline, we will assess cocaine use, cocaine craving, psychiatric symptoms, and high risk behaviors. Also at this visit, subjects will be randomly assigned to treatment with quetiapine target dose 400 mgday or placebo. During the treatment phase, subjects will visit the clinic once a week for safety monitoring, completion of ratings and questionnaires, UDSs, and participation in a cognitive-behavioral therapy group. At end of study, week 12, a physical examination will be administered and a UDS and clinical laboratory values obtained. In addition, substance use, psychiatric symptoms, and high risk behaviors will be assessed. To monitor safety and further evaluate treatment effects, we will ask participants to return for a follow-up visit at week 16. 