The Northern Ireland Under-21 international has been in prolific form this season and already has three hat-tricks to his name.
Swansea manager Brendan Rodgers returned to his homeland to watch the 19-year-old feature for Cliftonville in their County Antrim Shield victory over Glentoran last month, and the Welsh club went on to submit two bids for the player last week, the latter of which has been accepted.
While the fee is undisclosed, Press Association Sport understands the amount is less than ?100,000.
Donnelly will now begin talks over a January move to the Liberty Stadium and chairman Huw Jenkins told www.swanseacity.net: "I'm pleased to say we now have a written agreement with Cliftonville over the possible transfer of Rory Donnelly.
"However, we are yet to finalise terms with the player, that's the next process."
Donnelly had been attracting interest from several Premier League and Championship clubs, with League One Brentford having reportedly also made a bid.
Should a deal for Donnelly be completed it would be likely to end the Swans interest in a move for Preston forward Jamie Proctor.
Swansea have also been linked with a move for Blackburn midfielder Keith Andrews but that speculation is understood to be wide of the mark.
Source: PA
Source: PA