Carolina had to rally for the third day in a row as Virginia Tech (18-25-1, 7-17 ACC) got to Tar Heel starter Zac Gallen for single runs in the first and second. The Hokies loaded the bases with nobody out in the first but managed just one run on a Brendon Haydon sacrifice fly.
The Tar Heels responded with three in the third against Jon Woodcock to take a 3-2 lead. After a one-out walk by Korey Dunbar, Russell singled and Skye Bolt walked to load the bases. Landon Lassiter's four-pitch walk forced in a run before Tom Zengel singled home two more.
Virginia Tech tied it in the fifth with another sac fly before Ramirez's second homer of the year gave Carolina a 4-3 lead in the sixth.
The Hokies rallied again, though, and looked poised to take the lead when the first four batters of the eighth reached against Trevor Kelley. But Spencer Trayner got three consecutive shallow fly balls to keep it tied.
Virginia Tech staged one last push in the ninth against Trayner and Reilly Hovis, but once again the Tar Heel bullpen bent but didn't break. Hayden doubled with one out before Trayner intentionally walked Sean Keselica. Hovis entered and got Wernicki to fly out and Ryan Tufts to ground into a fielder's choice to set up the game-winner from Ramirez.
Russell led off the ninth with his third hit of the day and stole second before Bolt was intentionally walked. Lassiter flied out to right, but Russell advanced on the play, and Tech elected to intentionally walk Zach Daly to face Ramirez. The freshman right fielder lifted the first pitch he saw from Luke Scherzer (2-2) to center, and Russell's head-first slide was well ahead of the throw from Wernicki.
It was the first ACC sweep of the year for Carolina and just the second of 2014, and it pushed the Tar Heels two games above .500 in the league for the first time in over a month.
The Tar Heels will play once more before breaking for final exams when they host East Carolina on Tuesday, April 29, at 6 p.m.