EXCLUSIVE

XXXTentacion did his best to make sure everyone in his family was well taken care of ... buying many of them homes in the months leading up to his murder.

Sources close to the rapper tell us his most important objective in life was to take care of those around him. We've obtained real estate records that show XXX purchased 4 homes in South Florida between the months of April and June ... totaling $1.7 million. The homes break down as follows ...

-- $420,000 for a 3 bed, 2 bath 2,000 square foot home

-- $467,500 for a 4 bed, 2 bath 2,300 square foot home

-- $385,000 for a 4 bed, 2 bath 2,100 square foot home

-- $500,000 for a 4 bed, 3 bath 2,700 square foot home

It's unclear exactly who the homes were purchased for, but our source says the rapper took care of his parents, siblings, aunts, uncles, grandmothers and great-grandmothers.

As we reported ... the 20-year-old also had a baby on the way with his girlfriend at the time of his death.