The 16-year-old winger will link up with Rovers' development squad after the two clubs agreed a deal.
Blackburn-born Mahoney, who was with the club as a youngster, burst onto the scene as a substitute in Stanley's Capital One Cup tie against Premier League side Cardiff City back in August.
Since then he has added a further five first team appearances, including one start against Rochdale back in September.
Rovers' Under-21s boss Eric Kinder was thrilled to have added such a highly-rated footballer.
"It is a deal that I've tracked now for three months and thankfully it has come to a conclusion and I'm really excited," he said.
"I'm really looking forward to working with him. We have to start getting more young players in and if they are from Blackburn, brilliant."
For Mahoney, it is the realisation of a life-long ambition, as he lives just a stone's throw away from Ewood Park.
"It is something I've dreamt of for a very long time," he told Rovers Player
"If it was any other club then I probably would have stayed at Accrington Stanley, because I have had a wonderful time there.
"I'm glad this deal has gone through, it is the only one I would have accepted and I just can't wait to get out there now."