This paper examined use of a boron doped diamond electrode (BDDE) for the electroanalysis of ofloxacin (one of the fluoroquinolone compounds) by cyclic voltammetry (CV) and square wave voltammetry (SWV) in the presence of anionic surfactant (sodium dodecyl sulfate, SDS). The current signal due to the oxidation process was a function of the amount of ofloxacin, pH of the medium, effect of SDS and scan rate. Cyclic voltammetric studies indicated an irreversible behaviour of ofloxacin in phosphate buffer solution at pH 2.0 with well-defined oxidation peak at + 1.24 V (absence SDS) and + 1.21 V (presence of SDS) vs. Ag/AgCl, respectively. With optimized experimental parameters, the current response of ofloxacin was proportionally linear in the concentration range from 1.0x10(-7) to 3.5x10(-6) M. A detection limit of 1.76x10(-8) M was observed anodically electrochemical surface pretreatments. The practical applicability of the developed method was demonstrated on the determination of ofloxacin in human urine and pharmaceutical samples. In this way, BDD electrode may represent an efficient alternative to widely used modified electrodes in the determination of fluoroquinolone compounds.