It was an all-boys school up until the 1800's and then became so again when the Boston Latin School for Girls was built in 1877. The original school had its first official co-ed class in 1972. It didn't have a female headmaster until 1998.
An interesting fact about the school is its famous students which includes four Harvard University presidents, four Massachusetts governors, and five signers of the United States Declaration of Independence. Benjamin Franklin is one of its well-known dropouts. That's alright, he still did okay.