Your resume only contains the start and end dates of jobs you have held and does not provide the reason behind leaving the company. But when the interviewer or employer inquires about the same, disclosing the real reason is the best choice.
Lying to your potential future boss is not a good idea. Eventually, they are going to find it out and it could cost you your entire career. The employer may directly find it out from your employment screening or it can be outed later since the people today are connected with others on different platforms and if you know where to press, it is easy to get any information.
If you were fired due to misconduct or any other cause, you can justify why you deserve this current position by pointing out the lessons you have learned from your mistakes and how you will make sure that they will never be repeated. It only makes you a better individual who would try his/her best to do your job without committing any mistakes. To err is human, to correct is divine.