After the recent hit of COVID-19, many drugs were successively administered to save patients’ lives and those drugs reached aquatic sources, one of those drugs was Baricitinib. Driven by the current situation, a potentiometric technique using an ion-selective membrane (ISM) recipe drop cast on a modified carbon paste electrode was optimized for the superior determination of Baricitinib (BAR). The molecular docking was customized to optimize the proper ionophores incorporated in the ISM, revealing that beta-cyclodextrin (β-CD) is the most compatible ionophore with the studied drug. A multivariate optimization experimental design was employed to optimize the best experimental condition for the analytical method. To this end; dual nanoparticles (multi-walled carbon nanotubes and copper oxide nanoparticles) were incorporated in the carbon paste electrode, and the ISM recipe was enriched with β-CD and cation-exchanger (phosphotungstic acid) in a polyvinylchloride matrix plasticized with dibutyl phthalate. A Nernstian slope equal to 19.97 mV/decade with a linearity range of 7.99 × 10−7–1.00 × 10−3 M was obtained. The validated sensor exhibited good recovery when used to determine the studied drug in synthetic wastewater and tablet dosage form. The greenness of the method was evaluated using the Complementary Green Analytical Procedure Index and Blue Applicability Grade Index.