A porous silicon-based biosensor for rapid detection of bacteria was fabricated. Silicon (0.01 ohmcm, p-type) was anodized electrochemically in an electrochemical Teflon cell containing ethanoic hydrofluoric acid solution to produce sponge-like porous layer of silicon. Anodizing conditions of 5 mA/cm2 for 85 min proved best for biosensor fabrication. A single-tube chemiluminescence-based assay, previously developed, was adapted to the biosensor for detection of Escherichia coli. Porous silicon chips were functionalized with a dioxetane-Polymyxin B (cell wall permeabilizer) mixture by diffusion and adsorption on to the porous surface. The reaction of beta-galactosidase enzyme from E. coli with the dioxetane substrate generated light at 530 nm. Light emission for the porous silicon biosensor chip with E. coli was significantly greater than that of the control and planar silicon chip with E. coli (P<0.01). Sensitivity of the porous silicon biosensor was determined to be 101-102 colony forming units (CFU) of E. coli. The porous silicon-based biosensor was fabricated and functionalized to successfully detect E. coli and has potential applications in food and environmental testing.