Hi sagarjpatel,
How are you using your MacBook? It is recommended that you use your MacBook on a hard flat surface (especially if you're running CPU intensive processes), thus preventing overheating by allowing enough air space underneath the Mac. A lot of people use on their laps, beds and blankets etc. which is of course fine for short periods of time, however when you feel the machine starts to heat you should take the steps to ensure it wont overheat. Other things such as cases and charging will also affect heat.
The following Apple support website will shed a little more light on your MacBook and how to care for it, and even includes a section on battery heat. https://www.apple.com/batteries/maximizing-performance/
If you feel their is genuinely a problem with the machine, call Apple immediately. Under warranty you are still covered against technical faults.
Good luck.