A cation–π stacking structure consisting of a free-base porphyrin (FBP) and 1-butyl-3-methylimidazolium (BMIM+) cation is demonstrated by both ab initio theory and polarizable force field. The isolated FBP–BMIM+ complex forms a face-to-face alignment, and the polarizable force-field-optimized complex reproduces that by ab initio theory reasonably well. Molecular dynamics simulation finds that the stacking structure is slightly altered for the FBP dissolved in the bulk ionic liquid (IL) due to the complexity of the solution structure. In the bulk IL, the FBP is sandwiched between two BMIM+ cations stacking on both sides of the FBP ring plane with a slipped-parallel alignment. Furthermore, the FBP–BMIM+ stacking structure is found to be more stable than the BMIM+–PF6− ion pair in the IL.