This study presents an integrated microfluidic chip capable of performing DNA/RNA (deoxyribonucleic acid/ribonucleic acid) amplification, electrokinetic sample injection and separation, and on-line optical detection of nucleic acid products in an automatic mode. In the proposed device, DNA/RNA samples are first replicated using a micromachine-based PCR module or reverse transcription PCR (RT-PCR) module and then transported by a pneumatic micropump to a sample reservoir. The samples are subsequently driven electrokinetically into a microchannel, where they are separated electrophoretically and then detected optically by a buried optical fiber. The various modules of the integrated microfluidic chip are fabricated from cheap bio-compatible materials, such as PDMS, polymethylmethacrylate, and soda-lime glass. The functionality of the proposed device is demonstrated through its successful application to the DNA-based bacterial detection of Streptococcus pneumoniae and the RNA-based detection of Dengue-2 virus. It is shown that the low thermal inertia of the PCR/RT-PCR modules reduces the sample and reagent consumption and shortens the reaction time. With less human intervention, the subsequent DNA separation and detection could be performed in an automatic mode. The integrated microfluidic device proposed in this study represents a crucial contribution to the fields of molecular biology, genetic analysis, infectious disease detection, and other biomedical applications.