My company gives out project-based annual bonus at the end of each year, and I'm (probably) about to quit. Should I ask for my bonus for the projects I've already completed this year?
You can politely ask; however, companies have no obligation or incentive to pay bonuses early to an employee who is leaving.
Most companies pay bonuses to everyone at the same time to avoid conflict within the company culture. However, I have seen companies pay out prorated bonuses to employees leaving on good terms.
I believe that most companies pay bonuses as a reward system to aid in retaining good employees. I'm not sure how you could explain why you should get the bonus early without disclosing that you are leaving, which then defeats the purpose of the bonus.
Since you've already decided to leave, I don't think there is any harm in asking. Your company may be small enough to handle it differently, but you should go into the conversation understanding the company's goals also.