The invention relates to a method for generating a security file system of a smart card. The method comprises the following steps: 1, after the smart card receives a pre-initializing command, performing initial checking on a smart card data storage unit area, and determining the numbers of to-be-created directory control items and file control items according to parameters of the command; 2, creating the relative numbers of empty directory control items and empty file control items, and constructing independent empty directory control item chain tables and empty file control item chain tables; 3, based on the empty directory control item chain tables and the empty file control item chain tables, creating directories and files, constructing a membership relation between a directory and another directory and a relationship that the files are subordinate to the directories, and constructing specifically applied directory control item chain tables and file control item chain tables; and 4, performing corresponding directory and file selection and cancel. According to the method for generating the security file system of the smart card, the utilization rate of a data storage unit and the access control speed of the file system are increased, and meanwhile, the safety and the robustness of the file system are enhanced.