Assange, who initially moved into London's Ecuadorian embassy five years ago to avoid arrest over now-dropped Swedish rape charges, angered Madrid after addressing hundreds of people in Barcelona via video link in September.
"The Ecuadorian authorities have reiterated to Mr Assange his obligation not to make statements or activities that could affect Ecuador's international relations, which must be preserved, as is the case with Spain," the foreign ministry said in a statement.
It added Assange "has formally committed to observe behavior that is compatible with the will of the Ecuadorian state."
Although Swedish prosecutors dropped their rape probe, Assange, who denied all allegations, remains in the embassy over fears he will be extradited to the United States and put on trial for WikiLeaks publishing leaked secret US military documents and diplomatic cables in 2010.
But, when asked in May if arresting Assange was a "priority" for Washington, US Attorney General Jeff Sessions said that "we will seek to put some people in jail."
(Except for the headline, this story has not been edited by NDTV staff and is published from a syndicated feed.)
Get Breaking news, live coverage, and Latest News from India and around the world on NDTV.com. Catch all the Live TV action on NDTV 24x7 and NDTV India. Like us on Facebook or follow us on Twitter and Instagram for latest news and live news updates.