Mooy had been strongly linked with a move back to the Premier League and has made the switch to the south coast to continue his ambitions of playing in the top flight.
The 28-year-old's previous deal was set to expire at the end of this season, but he is now contracted to Huddersfield until the summer of 2022.
Huddersfield also have the option to extend the midfielder's contract by another year.
Mooy had made over 100 appearances for the Terriers since joining from Manchester City in 2016.
He helped the club achieve promotion to the Premier League and played 65 times for Town in the top flight.
“Aaron was adamant that he wanted to test himself again in the Premier League when Brighton’s interest came in, and we didn’t want an issue where we had a disillusioned player on the pitch in the final year of his contract," said manager Jan Siewert.
“We had to look after the interests of Huddersfield Town and couldn’t let him leave on a free at the end of the season, so him signing a new contract ahead of his loan move gives the club and the player possibilities for the future."
The Terriers have offset the departure of Mooy with the season-long loan signing of Chelsea youngster Trevoh Chalobah.
The youngster already has plenty of experience in the Championship, making 44 appearances for Ipswich Town last term.
The 20-year-old goes straight into contention for this weekend's game at QPR and can play in defensive midfield and at centre-back.
“I am very happy to welcome Trevoh to Huddersfield Town as I believe he is one of the top players in his age group," added Siewert.
“He is a player that fits straight into my system having the natural ability to play as a six.
"He’s a physical player, has a defensive mindset and takes great responsibility in supporting the defenders behind him, which frees up his fellow midfielders.
“He made a further step and developed during his loan spell at Ipswich Town last year and playing in this role, in my system, I believe he can make further steps and be a success with us.”
Meanwhile, goalkeeper Ben Hamer has joined fellow Championship side Derby County on a season-long loan.