Porous silicon (PSi) has been widely used as a biosensor in recent years due to its large surface area and its optical properties. Most PSi biosensors consist in close-ended porous layers, and, because of the diffusion-limited infiltration of the analyte, they lack sensitivity and speed of response. In order to overcome these shortcomings, PSi membranes (PSiMs) have been fabricated using electrochemical etching and standard microfabrication techniques. In this work, PSiMs have been used for the optical detection of Bacillus cereus lysate. Before detection, the bacteria are selectively lysed by PlyB221, an endolysin encoded by the bacteriophage Deep-Blue targeting B. cereus. The detection relies on the infiltration of bacterial lysate inside the membrane, which induces a shift of the effective optical thickness. The biosensor was able to detect a B. cereus bacterial lysate, with an initial bacteria concentration of 105 colony forming units per mL (CFU/mL), in only 1 h. This proof-of-concept also illustrates the specificity of the lysis before detection. Not only does this detection platform enable the fast detection of bacteria, but the same technique can be extended to other bacteria using selective lysis, as demonstrated by the detection of Staphylococcus epidermidis, selectively lysed by lysostaphin.