The Moon is a Harsh Mistress is a science fiction novel by Robert A. Heinlein about a Lunar colony's revolt against rule from Earth. It was published in 1966 and the year after it received the Hugo Award for best novel.

The novel is narrated by Manny, a one-armed computerman whose accidental discovery of the self-awareness of an intelligent computer ignites a revolution against the hated Lunar Authority. The computer, dubbed Mike (after Mycroft Holmes, brother of Sherlock Holmes) assumes the nom de guerre of Adam Selene, chairman of the revolution. The wise Professor de la Paz (Bernie), the beautiful rabble-rousing Wyoming Knott (Betty) and Manny (Bork) form the top-level cell in a plot with their fellow Loonies to liberate the Moon from Earth's control. Hazel Stone, a young girl "with no cushions" leads the Baker Street Irregulars (and later becomes Grandmother Hazel in The Rolling Stones).

The book is the origin of the acronym TANSTAAFL ("There Ain't No Such Thing As A Free Lunch"), and helped popularize the constructed language Loglan, which is mentioned in the story as being used for precise human-computer interaction.

The book is noteworthy, although by no means unique among Heinlein's work, for its assumptions about race and racism. Heinlein's forte was to describe his fictional future societies through the use of telling details rather than heavy-handed expostulation. One of those details in Moon is a thorough and thoroughly unselfconscious racial integration, most remarkable to Heinlein's readers for being unremarkable to the Lunarian colonists. But Heinlein does not predict that racial harmony will be universally true in the future; the reader doesn't realize how thoroughly integrated the moon is until Manny, on a diplomatic mission to the United States, is arrested for miscegenation after he innocently shows a picture of his extended family to his Southern hosts. Some insight into Heinlein's character is gained by recalling that the novel was published in 1966, during a time of significant turmoil over race relations and the future of race relations in the United States.

The setting of the novel was re-used much later by Heinlein for his late-period novel, The Cat Who Walks Through Walls.