I want to control a 12V heater coil with 5KHz 5V PWM using the below circuit, but the load voltage does not goes higher than 5V. I made a similar circuit with a MOSFET and the result does not changed. What's wrong with my circuit? How can I fix it?
Your BJT is an emitter follower - it can't have voltage gain greater than than 1 hence your 5V input produces an output that cannot be greater than 5V.
Think about how an NPN BJT works - the base has to have a voltage slightly greater than the emitter to cause collector current to flow. This means that the emitter voltage MUST be slightly less voltage than the base hence you'd probably get about 4 to 4.5 volts p-p at the emitter for 5Vp-p at the base.
If you want to switch a load connected to 12 volts, put the load in the collector and connect emitter to 0V/GND. This will also work for a MOSFET powering a heater coil. I take it the heater coil is purely resistive - if not then a slight modification may be needed.
If you definitely need a ground-tied load then consider this as an option: -
It should be OK for 5kHz PWM - if it were >50kHz I'd want to analyse it in more detail to see what the switching losses would be like.