The invention provides a preparation method of a prefabricated framework type integrally-formed composite square cabin. The preparation method includes the following steps that a square cabin framework system is prepared from prefabricated carbon fiber parts, prepreg is adopted as a square cabin skin material, rigid foams are adopted as a filling material, and under the assistance of a combined die, in a vacuum bag pressing manner, the composite square cabin is prepared at a certain temperature through integral forming. The continuity of inner skin and outer skin of the square cabin is good, the defects that a traditional metal framework type square cabin structure and a large plate type square cabin structure are complex in procedure, and the mechanical performance of combined joints is weak are overcome, and the square cabin is better in sealing performance and durability and lighter; and meanwhile, through the rigid foam and other functionalization, the square cabin can be embodiedwith the beneficial effects of being invisible, having shielding electromagnetism, being resistant to impact and the like, and the high-performance requirements in the fields such as military and civilian dual-use commanding systems, communication, medical treatment and logistical support are better met.