A hybrid mesoporous silica with dual‐emission property is prepared. Amphiphilic quinolone (AQ) molecules are synthesized as the structure directing agent to help construct the mesopores, while the silane derived porphyrin (TPP) molecules are anchored on the silica skeleton. The hybrid silica has a disordered pore structure with its pore diameter and surface area of 2.3 nm and 1412 m2 g−1, respectively. The hybrid material is sensitive to trivalence metal ions. It emits a red fluorescence at 650 nm before it meets metal ions. Fe3+, Cr3+ and Al3+ ions can induce 25 to 48 times increase of the green light emission intensity of the material, while Fe3+ can quench the red fluorescence of porphyrin. The change of the dual‐emission can be observed by naked eyes, meaning that the Fe3+, Cr3+ and Al3+ can be easily distinguished. The hybrid silica also shows low detection limits to trivalence metal ions, which are 8×10−5, 10−4, and 2×10−4 mol L−1, respectively. Furthermore, the dual‐emission material can serve as a three‐in AND‐OR gate for the logic system.