Heading angle is a vital parameter in maintaining a vessel's track along a planned course and should be guaranteed in a stable and reliable way. An innovative method of heading determination based on a fisheye camera, which is almost totally unaffected by electromagnetism and geomagnetism, is proposed in this paper. In addition, unlike traditional astronomical methods, it also has a certain degree of adaptability to cloudy weather. Utilising the super wide Field Of View (FOV) of the camera, it is able to simultaneously image the Moon and the horizon. The Moon is treated as the observed celestial body and the horizon works as the horizontal datum. Two experiments were conducted at sea, successfully proving the feasibility of this method. The proposed heading determination system has the merits of automation, resistance to interference and could be miniaturised, making application viable.