I'll answer as if I was a project manager actually in that situation. I'm also going to assume you're looking at a normal sized project team (4-8 people) rather than a programme of work spanning multiple teams (and perhaps 50+ devs).
Being in a situation where you have 500 bugs to fix in two weeks is a sign of a project in failure mode. There's no easy way out from here but giving a nice speech and smashing hours of overtime at the problem is likely to make it worse not better as motivation will drop and quality will likely slip.
Steps I would take:
Question the date
Find out what the importance of the date is. Sometimes hard deadlines are unavoidable but these are pretty rare. Perhaps you need to demo a product at a trade show. There might be a product launch you had loads of press coverage on. Maybe you promised a client you'd have things fixed on a date.
Whatever the reason for the deadline, understand the importance and if possible, negotiate some extra time. Ultimately, make sure it's communicated to the team. No-one gets motivated if they don't understand why they're doing something.
I'd run a workshop to de-prioritise as many of the bugs as I can. Gather the stakeholders needed and either create a linear list or use something like the MOSCOW technique to get an idea of what is absolutely needed and what could slip.
It'll be pretty much impossible to actually motivate people to work overtime unless they absolutely buy into the importance of resolving them.
Estimate the work
Starting with the most important, estimate the work with the team to get an idea of scale. Stop estimating as soon as you have 3 weeks of work (or deadline +1 week if you couldn't arrange an extention). There's little point continuing to discuss past that point as there is little chance you'll deliver further.
At this point you can set an expectation with stakeholders about what is actually achievable. Commit to getting the stuff you estimated as possible in two weeks as things you will fix. Show the additional week of estimates - you'll do these if some of the others are easier than at first thought.
Set a reward
I'd avoid anything financial and I wouldn't tie it to delivery. Simply saying 'we know the next few weeks is going to be tough, we'll go for a meal out when we're done' is likely to feel better than if you do this then I'll give you that.
Once you've started the bug fix period, make sure you're communicating with the team about progress daily. If possible, have a dashboard visible to the team showing progress towards the goal. Sense of progress and achievement is likely to spur people on.
Keep stakeholders informed of progress daily too. Encourage them to thank the team regularly, particularly as the really important issues get fixed.