Hogwarts Legacy is set in the late 1800s, specifically in the year 1890-1891. This is roughly a century before the events of the Harry Potter books and films, and before the birth of Harry Potter himself. The game takes place in several Wizarding World locations such as Hogwarts castle, Hogsmeade, and the Scottish Highlands. The player takes on the role of a student starting their studies at Hogwarts in the fifth year. According to the games official website, "The Wizarding World is fraught with dangers including creatures corrupted by a magical force, sinister witches and wizards, as well as a possible mounting goblin rebellion".