Graphical abstract: This paper reports the fabrication of Beryllon II/layered double hydroxide ultrathin films via the layer-by-layer assembly technique, which can be used as a ratiometric fluorescence chemosensor for Be2+ with good repeatability, high stability and excellent selectivity. Highlights: ► A ratiometric fluorescence sensor for Be2+ was fabricated by LBL method. ► The chemosensor shows a broad linear response range and a low detection limit. ► The sensor exhibits a high stability and excellent selectivity toward Be2+. ► The chemosensor can be easily regenerated and reused. - Abstract: A ratiometric fluorescence sensor for Be2+ has been fabricated via alternate assembly of 2-(3,6-disulfo-8-hydroxynaphthylazo)-1,8-dihydroxynaphthalene-3, 6-disulfonate (Beryllon II) and MgAl-LDH nanosheets on quartz substrates using the layer-by-layer (LBL) deposition technique. UV–vis absorption and the fluorescence emission spectroscopy indicate a stepwise and regular growth of the Beryllon II/LDH UTFs upon increasing deposition cycle. The film of Beryllon II/LDH possesses a periodic layered structure perpendicular to the substrate revealed by X-ray diffraction and scanning electron microscopy. Atomic force microscopy images show that the film surface is continuous and uniform. The Beryllon II/LDH UTFs display ratiometric fluorescence response for Be2+ with a linear response range in 1.0 × 10−7 1.9 × 10−6 mol L−1 and a detection limit of 4.2 × 10−9 mol L−1. Furthermore, the ratiometric sensor exhibits good repeatability, high stability (thermal, storage and mechanical) as well as excellent selectivity toward Be2+. XPS and Raman measurements demonstrate that the specific response of the sensor is attributed to the coordination between Be2+ and Beryllon II in the UTF. The Beryllon II/LDH UTFs in this work can be potentially used as a chemosensor for the detection of Be2+ in the environmental and biomedical field.