Roofe, who had struck in both league clashes against Derby this season, collected a fine cross from winger Jack Harrison and tucked the ball past goalkeeper Kelle Roos, to give his team a slim advantage in the tie.
Derby were awarded a penalty after Harrison appeared to foul Jayden Bogle in the 77th minute, only for referee Craig Pawson to overturn his decision and award a free kick to the visitors after consulting the linesman.
The teams meet at Elland Road in Wednesday’s second leg.
In the other game, Aston Villa defeated West Bromwich Albion 2-1 in the first leg of the other semi-final earlier on Saturday.
The return leg is at The Hawthorns on Tuesday.
The finalists will meet at Wembley on May 27 to decide who will join Norwich City and Sheffield United in the Premier League next season.