The incident happened near Dr Gray's Hospital shortly after 10:00.
The man was taken to the hospital with what police said were serious but not life-threatening injuries.
The A96 was closed in the area for several hours, but it has since reopened.

The parishioners at St Paul's, Shipley, posted the video on Facebook in February after a traditional advert failed to attract any applicants.
It was viewed more than 30,000 times and attracted media coverage across the UK.
The new vicar, Henriette Howarth, will take up the post next week.
The song, written by the children with the help of the church's musical director Rachel Hesselwood, listed the qualities the new vicar needed.
It begins with the lines: "If you want this choice position have a cheery disposition. Make us laugh, smile lots, play games, tell jokes."
Other requirements included "You must be kind, you must be fair. Bible stories you will share.
"Boy or girl it doesn't matter - but you must enjoy Harry Potter!"
It ends with a promise by the children to keep the church tidy and not to "talk in your sermons, we'll be good you'll see".

The Tigers, who have now won just once in six Championship matches, would have gone above Middlesbrough with victory.
Forest sacked boss Dougie Freedman on Sunday after a run of five defeats in six, but Gary Gardner's 30-yard strike put them ahead at the break.
Hull substitute Aluko rescued a draw, sliding the ball in after a deflection.
The goal came with 17 minutes remaining and lifted a restless home crowd who had seen their side struggle to create chances against an impressive Forest defence.
Although Abel Hernandez hit the post early on, Hull, who drop to fourth, were lifeless in attack and Gardner's sensational strike, after a neat passing move, increased the nerves.
Reds substitute Oliver Burke, who replaced debutant Federico Macheda following his loan move from Cardiff, could have made it 2-0 after a swift counter-attack.
But the hosts rallied, with Aluko making the most of a cruel deflection from Tom Huddlestone's shot to make it 1-1 and Mohamed Diame wasting a great chance for victory when he fired an effort just wide.
Hull manager Steve Bruce:
Media playback is not supported on this device
"It's really frustrating. We don't deserve to lose the game, that's for sure and they've scored a wonder goal and we've had enough chances to settle us down really.
"There's still 10 games to go or whatever it is. There's a lot of water to go under the bridge but we have to handle the situation at home better than what we're handling it at the moment. Everybody's anxious, which is not a good thing.
"We need to go up to Middlesbrough and get a result and hopefully that can be the case - there is no reason why we can't - and come back for the last five games and produce the sort of performances which has got us in this position because the last two or three weeks has been very frustrating."
Nottingham Forest manager Paul Williams:
"I don't think anyone gave us a chance tonight. Credit to the players that we took the game to Hull, especially early on.
"I asked every player to be themselves and be the best they could. Don't think it's about me and playing for me, just play for yourselves."
"My job is to prepare the team for a spicy local derby [against Derby County on Saturday] and that is what I will do.
"There are so many permutations, players who have played for both teams. The game isn't going to be about me."

Adrian Fatchett, 52, was injured at a house in Highfield Avenue, Athersley South, said South Yorkshire Police.
Mr Fatchett died on Saturday night despite being treated at the scene by paramedics, officers said.
A 17-year-old boy arrested on suspicion of murder has been bailed and investigations continue, said police.
A cyclist has suffered serious head injuries after a collision with a car in Elgin.
[NEXT_CONCEPT]
A church in West Yorkshire has recruited a new vicar following a video job advertisement sung by a choir of children.
[NEXT_CONCEPT]
Sone Aluko's equaliser denied Paul Williams victory in his first game as Nottingham Forest boss, but Hull missed the chance to go second in the table.
[NEXT_CONCEPT]
A man who died after he suffered a serious head injury at a party in Barnsley has been named.