Abstract Thickness reduction or loss of the calcareous eggshell is one of major phenotypic changes in the transition from oviparity to viviparity. Whether the reduction of eggshells in viviparous squamates is associated with specific gene losses is unknown. Taking advantage of a newly generated high‐quality genome of the viviparous Chinese crocodile lizard ( Shinisaurus crocodilurus ), we found that ovocleidin‐17 gene ( OC‐17 ), which encodes an eggshell matrix protein that is essential for calcium deposition in eggshells, is not intact in the crocodile lizard genome. Only OC‐17 transcript fragments were found in the oviduct transcriptome, and no OC‐17 peptides were identified in the eggshell proteome of crocodile lizards. In contrast, OC‐17 was present in the eggshells of the oviparous Mongolia racerunner ( Eremias argus ). Although the loss of OC‐17 is not common in viviparous species, viviparous squamates show fewer intact eggshell‐specific proteins than oviparous squamates. Our study implies that functional loss of eggshell‐matrix protein genes may be involved in the reduction of eggshells during the transition from oviparity to viviparity in the crocodile lizard.