The effects of adding aromatic and nonaromatic ionic liquids (ILs) on third-order nonlinear optical (NLO) responses of 5,10,15,20-Tetrakis(4-methoxycarbonylphenyl) porphyrin (S1) and [5,10,15,20-Tetrakis(4-methoxycarbonylphenyl)-porphyrin]–Co (II) (S2) at 532 nm were investigated using the Z-scan technique. ILs show negligible nonlinear response in compare with porphyrins. A significant increase in NLO response with adding DABCO-based IL to S1 was observed which approximately equal to Cobalt(II) ion substitution at the core of porphyrin structure. The obtained value of nonlinear absorption coefficient β (cm/W) and the nonlinear refractive index n2 (cm2/W), are of the order of 10−4 and 10−8, respectively. The positive synergetic effects were interpreted for enhanced nonlinear optical response by adding imidazolium-based IL and Cobalt(II) ion substitution at the core of porphyrin structure. Using ILs as additive led to excellent nonlinear properties which implies their promising applications in the optical devices.