Roofe has joined for an undisclosed fee understood to be about £3m, a club-record sale for the U's.
The 23-year-old started his career at West Brom, who are owed a share of the transfer fee due to a sell-on clause.
Grimes, 20, has struggled to break into the Swansea first team, making only one Premier League start.
The England Under-21 international joins up with former Swans boss Garry Monk, who signed him as a teenager from League Two side Exeter City for £1.75m in January 2015.
He played 13 times for Blackburn Rovers during a loan spell last season.
Roofe scored 18 goals in 40 league games for Oxford last season to help the U's earn promotion to League One, and he also contributed nine assists.
The Walsall-born player joined Oxford on an initial loan deal in February 2015, before making the move permanent in May of that year.
Find all the latest football transfers on our dedicated page.
Leeds have signed Oxford United forward Kemar Roofe on a four-year deal and brought in Swansea midfielder Matt Grimes on a season-long loan.