Magnetically modified biochar, with a rougher surface and more positive surface charge, may interact with microplastics (MPs) after being applied to soil, potentially altering the fate and transport of MPs in porous media. In this study, the transport and retention behavior of polystyrene microplastics (PSMPs) in a sandy porous media mixed with biochar/Fe3O4 modified biochar (Fe3O4-biochar) was investigated under various chemical conditions (humic acid (HA), ionic strength (IS) and cationic types (Na+/Ca2+)). The results showed that the addition of biochar and Fe3O4-biochar can hinder the transport of PSMPs in porous media without HA, and that Fe3O4-biochar was more effective in inhibiting the transport of PSMPs through electrostatic adsorption and complexation, with an optimum retention efficiency of 92.36 %. HA significantly attenuated the retention of PSMPs in both porous media through electrostatic repulsion, steric resistance and competitive adsorption under 1 mM Na+ solutions, and the mobility of PSMPs in Fe3O4-biochar/sand was enhanced more significantly than in biochar/sand with the increase of HA concentration. IS significantly inhibited the transport of PSMPs in both porous media in the absence of HA, but there was an antagonistic effect of HA and IS on the transport of PSMPs in the presence of HA, with the facilitative effect of HA being stronger than the inhibitory effect of IS. Ca2+ was consistently more effective in inhibiting the transport of PSMPs than Na+ under all test conditions, and HA promoted the transport of PSMPs in all Na+ solutions, while it inhibited the transport of PSMPs in high IS (10 mM) with Ca2+ solutions. In addition, HA, Fe3O4-biochar and PSMPs tend to form larger aggregates under the complex interactions of Ca2+, leading to increased retention of PSMPs in porous media. The two-site kinetic retention models suggested that the retention of PSMPs in porous media with biochar was predominantly reversible attachment effect, while retention in porous media with Fe3O4-biochar was predominantly an irreversible straining effect.