Ammonium polyphosphate (APP) is an effective phosphorus‐containing flame retardant. But APP also has excellent hygroscopic capacity and decreases the mechanical property of composite. The aim of the study was to microencapsulate APP with polymethyl methacrylate (PMMA) to prepare microencapsulated ammonium polyphosphate (PMAPP) in order to eliminate the harmful effects caused by the mechanical property of composite. The microcapsules are characterized by Fourier transform infrared spectroscopy (FTIR), thermogravimetric analysis (TG), and hydroscopicity test and observed by scanning electron microscopy (SEM). Fire hazard of rigid polyurethane foam (RPUF) is evaluated using a cone calorimeter and limited oxygen index test. The mechanical property of RPUF is studied by compressive strength test. The results show that APP has been microencapsulated by PMMA successfully and the shell does not decrease the beneficial effect of APP on fire hazard of RPUF. Furthermore, the shell also reduces the damage of APP on the mechanical property of composite. © 2019 Wiley Periodicals, Inc. J. Appl. Polym. Sci. 2019, 136, 48307.