Due to the emerging requirements of miniaturization and multifunctionality, monolithic devices with both functions of lighting and detection are essential for next-generation optoelectronic devices. In this work, based on freestanding (In,Ga)N films, we demonstrate a monolithic device with two functions of lighting and self-powered detection successfully. The freestanding (In,Ga)N film is detached from the epitaxial silicon (Si) substrate by a cost-effective and fast method of electrochemical etching. Due to the stress release and the lightening of the quantum-confined Stark effect (QCSE), the wavelength blueshift of electroluminescent (EL) peak is very small (<1 nm) when increasing the injection current, leading to quite stable EL spectra. On the other hand, the proposed monolithic bifunctional device can have a high ultraviolet/visible reject ratio (Q = 821) for self-powered detection, leading to the excellent detection selectivity. The main reason can be attributed to the removal of Si by the lift-off process, which can limit the response to visible light. This work paves an effective way to develop new monolithic multifunctional devices for both detection and display.