Britain's Tourism and Heritage Minister John Penrose said that Lennon's house in south Liverpool and McCartney's nearby home cannot be altered without local authorities' permission.
Lennon lived at his duplex house called "Mendips" on 251 Menlove Avenue from 1945 to 1963 with his aunt and uncle after his parents separated when he was 5 years old. McCartney lived on nearby Forthlin Road for nine years beginning in 1955.
The two wrote The Beatles' first No. 1 hit "Please Please Me" at Lennon's house.
A preservation group has already restored the houses to look as they would have done when Lennon and McCartney were growing up.
In a statement Wednesday, Lennon's widow Yoko Ono said: "Mendips always meant a great deal to John and it was where his childhood dreams came true for himself and for the world."
The preservation order was granted by English Heritage, a government-sponsored body that decides which buildings to preserve. It decided not to preserve the childhood homes of Beatles lead guitarist George Harrison and drummer Ringo Starr.
Emily Gee at English Heritage said Lennon's and McCartney's homes had been preserved because "they were scenes of huge amounts of rehearsal, of composition of songs, really intense creative hubs."
The Associated Press contributed to this report.