We demonstrate a 300 μm long silicon photonic crystal (PC) slot waveguide device for on-chip near-infrared absorption spectroscopy, based on the Beer-Lambert law for the detection of methane gas. The device combines slow light in a PC waveguide with high electric field intensity in a low-index 90 nm wide slot, which effectively increases the optical absorption path length. A methane concentration of 100 ppm (parts per million) in nitrogen was measured.