Microfluidics-based biochip devices are developed to perform DNA analysis from complex biological sample solutions. Microfluidic mixers, valves, pumps, channels, chambers, heaters, and DNA microarray sensor are integrated to perform magnetic bead-based rare cell capture, cell preconcentration and purification, cell lysis, polymerase chain reaction, DNA hybridization and electrochemical detection in a single, fully automated biochip device. Pathogenic bacteria detection and singlenucleotide polymorphism analysis directly from blood are demonstrated. The device with capability of on-chip sample preparation and DNA detection provides a costeffective solution to direct sample-to-answer genetic analysis, and thus has potential impact in the fields of point-of-care genetic analysis and disease diagnosis.