After winning 6-3 6-3 4-6 6-7 (7-9) 7-6 (10-6) on Rod Laver Arena, 35-year-old Berrettini appeared dazed.
Murray, who feared that his career would be over after having hip surgery in 2019, saved a match point at 5-4 in the final.
The 25th-seeded Englishman prevailed 6-4 4-6 6-4 6-4 in a first-round encounter that was postponed in Melbourne for three hours due to the intense heat.
After Emma Raducanu and Cameron Norrie won on Monday, former world number one Murray subsequently made sure four Britons would play in the second round with a remarkable win over semi-finalist Berrettini from the previous year.
Murray, who is rated 66th, won his first Grand Slam matchup against a top-20 foe since 2017.
Murray won the match after nearly five hours with a forehand that took a sizable chunk out of the net cord and left Berrettini stranded after sprinting to a 6-1 lead in the first-to-10 final-set tie-break.
On Thursday’s second round, the three-time major champion will take on either Australian Thanasi Kokkinakis or veteran Italian Fabio Fognini.
Murray, a five-time Melbourne runner-up, stated, “I will be feeling it this evening and tomorrow but right now I’m unbelievably happy and proud of myself,”
“I’ve been working to give myself the opportunity to perform in matches like this and against players like Matteo. It paid off tonight.
“I was a bit lucky at the end with the net cord, but it felt like some of the tennis was really good.
“He’s an unbelievable player and one of the best competitors.”
When the players were removed from the court at Melbourne Park due to temperatures over 35C, the British number two had a two sets to one advantage.
After a three-hour break, cooler weather helped Evans win 6-4 4-6 6-4 6-4.