Cyclohexanone-formaldehyde resin and acetophenone-formaldehyde resin were in situ modified with sodium alendronate and the nanocomposites of cyclohexanone-formaldehyde resin with sepiolite and montmorillonite by adding the nanoclay into the resin formation media. The analysis of nanocomposites of nanoclay in the resin were carried out with X-ray diffraction. Exfoliated nanocomposites containing as much as 5 wt% sepiolite were obtained while the nanocomposites of montmorillonite were intercalated. The nanocomposites of alendronic acid-modified ketone-formaldehyde resin containing as much as 20 wt% sepiolite or 10 wt% montmorillonite were successfully produced in situ. Fourier transform infrared and nuclear magnetic resonance spectroscopies (NMR) were used for the structural characterization of the modified resins. The alendronic acid modified resins and their nanocomposites with the clays were used to produce reactive non-toxic fire retardant rigid polyurethane foam. The polyurethane foam containing alendronic acid-modified acetophenone-formaldehyde resin had a residue of 20% in the thermogravimetric analysis and was HB-grade in the horizontal fire test (HB) and self-extinguished in about 3-5 s during the test. Polyurethane foams containing alendronic acid and the nanoclay with the limiting oxygen index value of 20.8 were achieved.