© 2020 Elsevier B.V.This study is about the use of the boron-doped diamond electrode pretreated electrochemically (anodic and subsequent cathodic) in the voltammetric determination of hepatitis C antiviral drug ledipasvir. Cyclic voltammetric measurements revealed that the compound yielded two well-separated irreversible oxidation peaks (PA1 and PA2) in acidic medium. The dependence of intensities of currents and potentials on electrode pretreatment, pH and nature of the supporting electrolyte, and other variables was investigated by square-wave voltammetry. Determination of ledipasvir was performed in Britton-Robinson buffer (pH 2.0) on the basis of both PA1 and PA2, which offered linear concentration ranges 0.5–60.0 μg mL−1 (5.6 × 10−7–6.8 × 10−5 mol L−1) and 5.0–60.0 μg mL−1 (5.6 × 10−6–6.8 × 10−5 mol L−1), respectively, with detection limits of 0.12 μg mL−1 (1.4 × 10−7 mol L−1) and 0.76 μg mL−1 (8.6 × 10−7 mol L−1). The practical applicability of developed methodology was tested by the assay of a fixed-dose combination tablet with sofosbuvir.