China has 119 boys born for every 100 girls, an imbalance that has grown since it introduced a one-child policy more than 25 years ago to curb population growth - a restriction that bolstered traditional preferences for boys.
But politicians could not agree on the amendment to the Criminal Law, the China Daily said, citing Zhou Kunren, the vice-chairman of the parliamentary law committee.
Some felt the law was needed to correct the gender ratio.
"However, other experts argue it is inappropriate to criminalise such practice because pregnant women enjoy the right to know the sex of the foetus," the newspaper said.
Sex-selective abortion is already banned, but technology such as ultrasound has made it easier to know a baby's gender in advance, and experts have said criminalising the ban would more effectively deter parents from aborting baby girls.
The northern province of Hebei last month closed more than 200 clinics for telling women the sex of their babies, state media reported.
In rural areas of the province, there were 134 boys born for every 100 girls.
But despite wanting to curb the sex imbalance, China has cracked down on those who advocate against the one-child policy or who have exposed coercive family planning measures.
Among them is Chen Guangcheng, a legal expert in the coastal province of Shandong, who exposed forced abortions and sterilisations.
He is in jail facing what his lawyers believe to be trumped up charges of deliberately destroying public property and assembling a crowd to disrupt traffic.