Revealing the mechanisms of animal adaptation to different habitats is one of the central tasks of evolutionary physiology. A particular case of such adaptation is the visual adaptation of marine species to different depth ranges. Because water absorbs more intensively longer wavelengths than shorter wavelengths, the increase of habitat depth shifts the visual perception of marine species towards the blue region. In this study, we investigated the molecular mechanisms of such visual adaptation for two squid species – Alloteuthis subulata and Loligo forbesi. These species live at different depths (200 m and 360 m, respectively) and the absorption maximum of A. subulata visual rhodopsin is slightly red-shifted compared to L. forbesi rhodopsin (499 and 494 nm, respectively). Previously, the amino acid sequences of these two species were found to differ in 22 sites with only seven of them being non-neutral substitutions, and the S270F substitution was proposed as a possible candidate responsible for the spectral shift. In this study, we constructed computational models of visual rhodopsins of these two squid species and determined the main factors that cause the 5 nm spectral shift between the two proteins. We find that the origin of this spectral shift is a consequence of a complex reorganization of the protein caused by at least two mutations including S270F. Moreover, the direct electrostatic effect of polar hydroxyl-bearing serine that replaces non-polar phenylalanine is negligible due to the relatively long distance to the chromophore