The invention discloses a method and device for protecting program memory space through precise partitioning, and relate to the technical field of digital memory. The method comprises the steps that a first memory space is obtained according to the program memory space, the first memory space is processed to obtain a front end region and a rear end region, the front end region and the rear end region are subjected to recursive partitioning, and the access permission of sub-regions obtained through partitioning is set. The device comprises a first memory space generating module, a first judgment module, a first portioning module, a second judgment module, a front end region generating module, a rear end region generating module, a front end region processing module, a rear end region processing module, a third judgment module, a fourth judgment module, a front end region updating module and a rear end region updating module. The program memory space is protected through precise partitioning, the situation that due to inaccurate partitioning, the program cannot operate normally is avoided, and waste of system resources is avoided.