Trump said the agreement would grant the US "permanent control over security, and all other needs" in the semi-autonomous Danish territory.
The leaders of Denmark and Greenland welcomed the deal to "strengthen security" in the region, which they said was expected to be signed next week, but did not outline its contents.
The announcement comes after months of threats by Trump to "take" Greenland over national security concerns, citing its strategic location for defence purposes and its mineral wealth.
No text of the agreement has been released. Trump said the deal came with "no cost to the United States" and would grant the US the ability "to do what is necessary" to "secure and defend the security of Greenland", in a post on Truth Social.
He said it included a rule that no US adversary could maintain a military presence in Greenland or "make sensitive investments in Greenland, without our express written approval".
Denmark's Prime Minister Mette Frederiksen said she was "pleased that there is a prospect of a good agreement" for all three parties, which was expected to be signed at the UN General Assembly next week.
The deal "strengthens our common security in the Arctic and the North Atlantic area" while also recognising"the sovereignty and territorial integrity of the Kingdom and the right of the Greenlandic people to self-determination", she said in a joint statement with Greenland's Prime Minister Jens-Frederik Nielsen.