**2. Experimental section**

An A-type alkylammonium intercalation compound, (2C182MeN)1.0(K, H)3 [Nb6O17] (2C182MeN = dioctadecyldimethylammonium ion), was prepared based on the previous report [49]. Octadecylphosphonic acid (ODPA) was synthesized as described elsewhere [61, 62]. Dodecyltrimethylammonium chloride, carboxypropylphosphonic acid (CPPA), 2-butanone, acetone, and tetrahydrofuran (THF) were used without further purification.

First, interlayer I of the A-type alkylammonium intercalation compound was modified by ODPA. The A-type alkylammonium intercalation compound (0.05 g) and ODPA (0.048 g) were used to adjust the Nb:ODPA molar ratio to 1:4 and reacted in 2-butanone (20 mL) at 150°C for 7 days. After the reaction, the crude product was centrifuged, washed with THF and HCl (pH = 3), and airdried (ODPA\_NbO). The cations (K<sup>+</sup> , H+ ) in interlayer II were then exchanged with the dodecylammonium ion (C12N+ ) to expand interlayer II. ODPA\_NbO (0.1 g) and dodecyltrimethylammonium chloride (0.19 g) were used to adjust the ODPA:C12N+ molar ratio to 1:10 and reacted in water (10 mL) at 80°C for 3 days. After the reaction, the crude product was centrifuged, washed with water, and air-dried (ODPA\_C12N\_NbO). Then, interlayer II of ODPA\_C12N\_NbO was modified by CPPA. ODPA\_C12N\_NbO (0.05 g) and CPPA (0.05 g) were used to adjust the Nb:CPPA molar ratio to 1:10 before reaction in 2-butanone (10 mL) at 80°C for 3 days. After reaction, the crude product was centrifuged, washed with THF and HCl (pH = 3), and corrected as a precipitate (ODPA\_CPPA\_NbO). After centrifugation, the product dispersed in supernatant was corrected by slow evaporation of THF (ODPA\_CPPA\_NbO\_evaporation). TEM and AFM samples were prepared by stirring ODPA\_CPPA\_NbO in THF to exfoliate them into single-layer nanosheets.
