XXXTentacion says the girl he smacked in an old video that recently resurfaced is now trying to pull a money grab.

Sources close the 20-year-old rapper tell TMZ ... X and the the girl were in touch right after the video made the rounds online. We're told they jokingly made the video in 2013 when they were both 15 and she agreed to go on the record with X's lawyer to make it clear -- the video was made as a joke.

But our sources say things went south when the girl's grandparents called the rapper's team asking what they'd be willing to do to "make everything good" ... leading X to think they were after money. The girl also posted this statement on her Instagram.

XXX's attorney, Jaclyn Broudy, tells TMZ ... "This 'terrified' woman decides to post this video now, conveniently, when [XXX] becomes famous. Draw your own conclusions."