A sensitive near-infrared ratiometric fluorescence sensing platform was designed and structured. The platform consisted of carbon dots and a small organic molecule probe with pinacol phenylborate as the recognition group, and has been applied for ratio imaging of hydrogen peroxide in vivo.