The combination of room-temperature phosphorescence (RTP) and covalent organic frameworks (COFs) would give rise to a new class of functional materials with sensing and responsive properties. However, such organic materials have been rarely reported, especially for those with long phosphorescence lifetimes. Here we report the incorporation of RTP emitters into COFs either via chemical decoration or noncovalent doping to achieve ultralong RTP in a COF system. The RTP emitters are designed with small phosphorescence rates and consequently exhibit ultralong phosphorescence lifetimes when nonradiative decay and oxygen quenching are suppressed in COF system. The RTP-COF materials have been found to possess oxygen sensing properties with large response of phosphorescence lifetimes.