Jamie Foxx is a dancing machine who also knows how to quickly turn off the switch ... especially when it comes time to explain why his new film is the most important one he's ever worked on.
We got the actor out Wednesday night leaving Avra in Bev Hills ... where Jamie did battle with a fan on a makeshift dance floor. We'll call it a tie cause both got down pretty well.
When that ended ... Jamie told our guy about "Just Mercy" ... and how his dad's own experience in the legal system and prison over a petty, $25 drug offense provided both inspiration and validation over the project.
Jamie's got nothing but love for crusading lawyer Bryan Stevenson, founder of the Equal Justice Initiative and whose 2014 memoir is the basis of the critically-acclaimed film starring Jamie and Michael B. Jordan.
The film's about a wrongfully convicted man on death row in Monroeville, Alabama ... and that clearly struck a chord in Jamie.