This study aimed to characterize the population pharmacokinetics of sertraline in Mexican patients with psychiatric and substance use disorders. Fifty-nine patients (13 to 76 years old) treated with doses of sertraline between 12.5 and 100 mg/day were included. Plasma sertraline concentrations were determined in blood samples and five of the main substances of abuse were determined by rapid tests in urine samples. Demographic, clinical, and pharmacogenetic factors were also evaluated. Population pharmacokinetic analysis was performed using NONMEM software with first-order conditional estimation method. A one-compartment model with proportional residual error adequately described the sertraline concentrations versus time. CYP2D6*2 polymorphism and CYP2C19 phenotypes significantly influenced sertraline clearance, which had a population mean value of 66 L/h in the final model. The absorption constant and volume of distribution were fixed at 0.855 1/h and 20.2 L/kg, respectively. The model explained 11.3% of the interindividual variability in sertraline clearance. The presence of the CYP2D6*2 polymorphism caused a 23.1% decrease in sertraline clearance, whereas patients with intermediate and poor phenotype of CYP2C19 showed 19.06% and 48.26% decreases in sertraline clearance, respectively. The model was internally validated by bootstrap and visual predictive check. Finally, stochastic simulations were performed to propose dosing regimens to achieve therapeutic levels that contribute to improving treatment response.