In order to reduce the number of cameras which are equipped in spacecraft, and using a small amount of cameras to monitor the whole spacecraft, an optical system of fisheye lens is designed based on the principle of non-similarity. The optical system uses a high definition CCD which has 1920×1080 pixels (the size of pixel is 5.5μm×5.5μm). The effective focal length of the fisheye optical system is 5.0 mm, the F number is 5.0, and the full field of view (FOV) is 180°. Its modulation transfer function (MTF) in all FOV is more than 0.5 at 91 lp/mm with great image. And the relative illumination of marginal FOV reaches 85.2%, this guarantees that the optical system has a good of illumination uniformity. Taken into account that the camera will be used in the intricate space environment, the article was analyzed the influence of environmental factors, the changing temperatures and vacuum environment, on the imaging quality of the optical system. The results show that the optical system of fisheye lens still has good imaging performance under the temperature -40°C~+60°C in vacuum environment. In the imaging process, the stray light which likes a red ring has been found at the edge of the image when the strong light source appeared in the middle of the image, it is similar to a positive ghost. After analysis, the results show that stray light mainly comes from the reflected light among the lens surfaces. So, there is a proposal that the radius of these lens surfaces should be restricted under optimization. Through the further optimizing and experiment, the consequence proves that the stray light was successfully eliminated.