The invention provides a method for measuring a deviation between a digital sun sensor measuring coordinate system and a prism coordinate system. The method includes installing a digital sun sensor on a high precision three-axle table, using a solar simulator for simulating solar ray vector to irradiate the digital sun sensor, using a theodolite for measuring the deviation of Z-axis in the prism coordinate system of the digital sun sensor relative to the Z-axis of the measuring coordinate system, and using two theodolites for measuring the deviation of X-axis in the prism coordinate system of the digital sun sensor relative to the X-axis of the measuring coordinate system and the deviation of Y-axis in the prism coordinate system of the digital sun sensor relative to the Y-axis of the measuring coordinate system. The measuring coordinate system of a detector optical filter and the prism coordinate system are connected by means of light measuring mode, and the measuring of the coordinate system relationship is completed on the ground. The measured deviation between the coordinate systems can be used for arranging and installing the satellite directly, and can be provided for the attitude and orbit control system to amend the inflight measuring coordinate system directly. The method has high reliability, high credibility, and high enforceability.