Efficient and accurate recovery of phenolic compounds from coal chemical wastewater is a significant challenge that motivated this study. We designed a poly(ionic liquid) (PIL) with high porosity and multiple adsorption sites. The adsorption behavior and interaction mechanism of the PIL with phenolic compounds of various substituent types and positions were investigated through a combination of adsorption experiments and quantum chemical calculations. The study of substituent types in phenolic compounds includes -Br, -CH3, -OCH3, and -NO2, whereas the substituent positions include ortho, meta, and para positions. The adsorption experimental results showed that the adsorption rates of the PIL for n-bromophenol and phenol were 100 % and 67.51 %, respectively, indicating that the substitution of -Br for -H led to a significant difference in the adsorption effect. The adsorption rates of the PIL for ortho-, meta-, and para methoxyphenol were 69.92 %, 75.69 %, and 88.95 %, respectively, suggesting that the substitution of -H with -OCH3 at different positions of phenol resulted in significant differences in adsorption effects. To address this adsorption phenomenon, quantum chemical calculations were first performed on PIL-phenol/n-bromophenol dimers, and it was found that hydrogen bonding and pi-pi stacking interactions are crucial factors contributing to the different adsorption rates of phenolic compounds with various substituents. Quantum chemical calculations of PIL-ortho/meta/para-methoxyphenol showed that the interaction between n-methoxyphenol and the PIL was stronger when the substitution position of -OCH3 was further away from -OH. The methods and principles uncovered in this study are universal and can provide valuable guidance for the design, screening, and host-guest interactions of the PIL-related materials.