Roy Hodgson had been keen to add to his attacking options following the departures of Bakary Sako and Lee Chung-yong earlier this summer.
Swansea had wanted £12million for Ayew and turned down an offer in the region of £7m earlier this summer from Fulham. Palace will have an option to buy in January.
The Eagles had been linked with a move for out-of-favour Liverpool striker Danny Ings but they have swooped for the Ghanaian instead.
Ayew, 26, was the club's top scorer last season with 11 goals as they were relegated from the Premier League.
There is not expected to be much more business done at Selhurst Park on deadline day with chairman Steve Parish insisting any late bids for star man Wilfried Zaha would now be 'ridiculous'.
The 25-year-old would be open to a move to a top-six club and has told team-mates there is an offer for him to leave Selhurst Park. However, no one has come close to meeting Palace's £70million evaluation so far.
The Eagles are under little pressure to sell after tying Zaha to a long-term deal in 2017 worth £100,000 per week, but the Ivory Coast international made his intentions clear by rejecting improved terms earlier this summer.
Crystal Palace begin the Premier League season away to newly-promoted Fulham at Craven Cottage on Saturday.