Under the agreement, the team would receive a combination of rent credits and reductions from the city in order to complete needed repairs at the stadium, according to an announcement on the team's website.
The agreement still has to be approved by the city's Recreation and Parks Commission and the Board of Supervisors.
"We hope this settlement will be finalized allowing us to improve the game day experience for our fans during our remaining years at Candlestick Park," the announcement said.
The team still plans to move to Santa Clara in 2015, 49ers spokeswoman Lisa Lang said.
Santa Clara voters in June approved a ballot measure to build a new stadium that the team would use when it moves.
However, San Francisco Mayor Gavin Newsom has said he hopes the 49ers will stay in San Francisco, and that the city is ready to help the team build a new stadium there.