The deal for the 18-year-old could rise to £6.5m with a further £2.5m available in add ons, plus a sell-on clause for the Scottish club worth 17.5 percent.
Ramsay, who has penned a five-year contract and will wear No 22 at Anfield, will be part of the first team immediately with no plans to loan the player out this season.
The Scotland Under-21 international will provide cover for Trent Alexander-Arnold at right-back and admitted the move was a “dream come true”.
“I’m just buzzing and it’s a dream come true really to be here,” Ramsay told Liverpool’s official website. “It was a dream come true to play for Aberdeen, and now to be at one of the biggest, if not the biggest club in the world, it’s a massive achievement and I’m looking forward to trying to show the fans what I’ve got.
“Hopefully I can come in in pre-season, show everyone at the club, the staff, players what I’ve got and then we’ll see what happens from there.”
It is the Reds’ third summer signing following the £64m deal, rising to £85m, for Darwin Nunez, while Fabio Carvalho arrives for from Fulham for an initial £5m, rising to £7.7m, with the Cottagers retaining a 20 percent sell-on clause.
Ramsay also becomes Aberdeen’s most expensive transfer, topping the £3m paid by Nottingham Forest in 2020 for Scott McKenna.
Ramsay made 33 appearances and scored one goal in all competitions last season for the Dons and won the SFWA Young Player of the Year and he hopes the pathway to the first team for youngsters under Klopp continues.
“There’s been a lot of young players that have played – the likes of Trent [Alexander-Arnold] and Harvey [Elliott] as well, there’s a lot more,” said Ramsay.
“There’s obviously a pathway here – that’s one of the reasons I chose it as well. It’s not just a massive club, they give young players chances in the first team.
“So if I can come in in pre-season, put my mark down, then there’s no reason why I can’t push to get in the first-team squad.”