The Bluebirds had two bids turned down in January for the 29-year-old and are believed to have made a recent offer of £1.2m.
Hayes, who has a contract at Aberdeen until the summer of 2019, is also a target for Scottish champions Celtic.
"You can only wait for so long and you've got to move on," Warnock told BBC Wales Sport.
"Aberdeen want two players from Celtic and they've been messing us around for quite a few weeks now.
"And it wouldn't surprise me if their manager Derek McInnes goes to Sunderland either - there might be other motives behind everything stalling.
"We've moved on and gone on to another one or two targets that haven't been mentioned yet."
Hayes has made 206 Aberdeen appearances in all competitions, scoring 29 goals, since arriving from Inverness Caledonian Thistle in 2012.
The former Leicester City player previously worked with Celtic manager Brendan Rodgers at Reading.
Although conceding defeat on Hayes, Warnock said he was "optimistic" on adding "one or two" players to Cardiff's squad within the week, one of which he revealed was a striker.
"We are down the line with two or three and the quicker the better I can get them signed up," Warnock added.
"We've got a goalkeeper on the wish list, a striker and possibly another midfielder, now that Peter Whittingham is leaving.
"I'm quite happy at the back so now it's just a matter of getting some more goals signed up to complement the squad.
"It's hard work at the minute. Every club is after strikers and everybody knows certain targets that I've had and they're still on the table.
"But it would be nice to try and get one over the line."
Cardiff City manager Neil Warnock has given up on signing Aberdeen's Republic of Ireland winger Jonny Hayes.