The Ghanaian striker was loaned to Fenerbahce last season and had to leave the club this summer.
Ayew, 29, said he had received offers from several clubs before Monday's European transfer deadline, but chose to stay at Liberty Stadium.
"The club was aware of the options, but he made it clear he wanted me to stay," he said.
"I really like my football in Swansea and I would love nothing more than to be part of this team".
"I feel at home here and sometimes you have to go with what your heart tells you, I think we can do great things, I'm ready to go on and get going."
Ayew joined Swansea in 2015 and its exceptional form enabled it to transfer £ 20.5 million to West Ham in 2016.
In January 2018, he returned to Swansea with a record club contract, but failed to save them from relegation to the Premier League and joined Fenerbahçe on loan in July 2018.
Ayew took part in Swansea's victorious match at Leeds United last Saturday, which allowed him to take the lead in the championship.