Scanning tunneling microscopy was used to visualize a four-component two-dimensional crystal formed at a liquid-solid interface. Simply mixing the four components and applying it to a graphite surface led to spontaneous self-assembly of the crystal. The presence of selected guest molecules induced a structural transformation of the host network from non-porous to porous by co-adsorbing inside the formed pores. Both hydrogen bonding and van der Waals interactions stabilized the network.