Ampicillin has been widely used broad-spectrum antibiotic for the purposes of treatment and prevention of gastrointestinal, urogenital, skin bacterial infections and primarily respiratory, has a low human toxicity. In fact, antibiotics play main important roles in therapeutic classes, however, erroneous use or excessive uptake for the application of agriculture, animals even humans have resulted in major health problems especially in increasing the number of allergies due to the wider levels of exposure. By this mean, specific detection of ampicillin using nanobiosensor is crucial and the current research presents the improvement of specific in vitro ampicillin detection using titanium dioxide nanoparticle (TiO2NP)-based interdigitated device electrode (IDE). The fabrication of biosensor was done using the conventional photolithography integrated with the process of an inductively coupled plasma dry etching. Surface modifications were applied on TiO2NP-modified electrode surface with 3-Aminopropyl trimethoxysilane, glutaraldehyde, streptavidin and biotinylated aptamer as DNA probe. These surface modifications of multiple self-assembling monolayers function to afford the additional control for stability. The immobilized aptamer DNA probe was interacted with the target ampicillin, resulting in current field changes across the device. I-V relationship interprets the selective binding of ampicillin and discriminated against kanamycin and carbenicillin. Our sensing system is able to detect the ampicillin in the linear range of 0.1 ng until 10 mg/ml with the limit of detection at 0.1 ng/ml. This sensor platform to detect the purity of ampicillin promise more benefits in pharmaceutical industries.