Direct, rapid, and sensitive detection of drugs in complex biological samples is essential for drug abuse control and health risk assessment. In this work, an electrochemical sensor was fabricated based on equipment of vertically-ordered mesoporous silica film (VMSF) on an electrochemically pre-treated three-dimensional graphene electrode (p-3DG), which can achieve direct and sensitive determination of methylthiopyridazine (TR) in urine. Three-dimensional graphene (3DG) with a continuous and interpenetrating graphene network was used as the supporting electrode and simple electrochemical polarization was employed to pre-treat 3DG to improve surface hydrophilicity and electrocatalytic performance. VMSF was easily grown using an electrochemical assisted self-assembly method within 10 s and was stably bound to the p-3DG surface. The nanochannel array on the as-prepared VMSF/p-3DG sensor enriched positively charged TR, leading to significantly improved electrochemical signal. Combined with the high electric activity of p-3DG and the enrichment of nanochannels, VMSF/p-3DG realized sensitive determination of TR ranging from 50 nM to 10 μM with a low detection limit (DL, 30 nM). Owing to the anti-fouling and anti-interference performance of VMSF, the common electroactive molecules including ascorbic acid (AA) and uric acid (UA) did not interfere with the detection. In addition, the detection of TR in buffer and urine exhibited similar sensitivity. Accurate detection of TR in urine was realized.