The invention discloses a VxWorks operating system scaling and customizing method for an aerospace computer, comprising the following steps of: firstly, executing module level scaling on source codes of an original VxWorks operating system, specifically, scaling a kernel source code directory irrelative to a system structure of a processor used in an onboard computer and scaling the kernel sourcecode director and a source code file corresponding to an operating system component irrelative to the application; secondly, executing source code function level scaling, specifically, deleting a function which cannot be called by the system software and the application software, in the kernel source code, and modifying a component configuration source file, a header file, the conditional compilation and a board support package; thirdly, modifying the scaled operating system source code according to the spacecraft software programming conventions; and finally, completely compiling the scaled operating system source code to generate an operating system kernel library. The method provided by the invention can solve the problems, such as that the onboard computer operating system occupies too much storage space and has excessive modules, codes of the onboard computer operating system are not coincident to the spacecraft software programming conventions, and the like.