My headhunter sent me an e-mail saying that there is a job opening at xx company. Later I saw LinkedIn posting it (it was recommended to me "this companies are looking for candidates like you"). Should I apply for it via LinkedIn, or should I wait for my headhunter to submit my resume? If I apply for it online and then the headhunter also submit my resume for me, and if I end up getting the job, would the company reject to pay headhunter commission?
I think you would do better to let the headhunter introduce you. Usually, headhunters have relationships with the companies they solicit for, and the companies are more likely to favor candidates submitted by them than unknowns that come from website leads. The headhunter is supposed to screen out inappropriate candidates. It is also better to have a good relationship with your headhunter, as they have their priorities as well.
I don't see any advantage to applying through the web page. It's not like they are likely to pay you more money because of it. And if you do apply through the web page, definitely do NOT let the headhunter submit you. That is unprofessional and can make you look bad to both parties.