He was born in Sloatbury, near Goshen, New York, and orphaned at an early age, his father having been killed by a British soldier two months before he was born, and his mother dying a few years later. He was brought up by his maternal grandparents.
Appointed midshipman in the Navy in 1800, he became sailing master of the frigate USS United States under Commodore Stephen Decatur by the War of 1812, and was promoted to lieutenant for conspicious gallantry in the capture of the frigate HMS Macedonian.
Sloat then served in Grampus, Franklin, Washington, and St. Louis. In 1844 he was appointed to command the Pacific Squadron, and in 1845, as tensions with Mexico grew, he was instructed to land in California and claim it for the United States if war broke out. Receiving a report of fighting on the Texas border while off Mazatlan, he raced north (the British were reportedly interested in California too), raised the flag over the Customs House at Monterey on July 7, 1846, and issued a proclamation announcing that California was now part of the United States.
Two destroyer escorts were named in his honor.