Newcastle United had submitted a £1million-plus bid for the left-back, believing it would trigger a release clause in his contract.
The 22-year-old held talks with the club but has decided to remain at the Liberty Stadium as Swansea City prepare for life in the top flight under manager Brendan Rodgers.
Taylor admitted his relief at the new deal, having been unsettled by the speculation over his future.
He told swanseacity.net: "This has been the hardest month of my life. There has been so much written and said about me that was untrue it really hurt at times.
"It's dragged on longer than everyone expected because I've been on holiday, the chairman (Huw Jenkins) has been on holiday and the manager has been away.