The recently discovered (Li0.8Fe0.2)OHFeSe superconductor provides a new platform for exploiting the microscopic mechanisms of high-T-c superconductivity in FeSe-derived systems. Using density functional theory calculations, we first show that substitution of Li by Fe not only significantly strengthens the attraction between the (Li0.8Fe0.2)OH spacing layers and the FeSe superconducting layers along the c axis but also minimizes the lattice mismatch between the two in the ab plane, both favorable for stabilizing the overall structure. Next, we explore the electron injection into FeSe from the spacing layers and unambiguously identify the Fe-0.2 components to be the origin of the dramatically enhanced interlayer charge transfer. We further reveal that the system strongly favors collinear antiferromagnetic ordering in the FeSe layers, but the spacing layers can be either antiferromagnetic or ferromagnetic depending on the Fe-0.2 spatial distribution. Based on these insights, we predict (Li0.8Co0.2)OHFeSe to be structurally stable with even larger electron injection and potentially higher T-c.