Metasurfaces with unparalleled controllability of light have shown great potential to revolutionize conventional optics. However, they mainly require external light excitation, which makes it difficult to fully integrate them on-chip. On the other hand, integrated photonics enables packing optical components densely on a chip, but it has limited free-space light controllability. Here, by dressing metasurfaces onto waveguides, we molded guided waves into any desired free-space modes to achieve complex free-space functions, such as out-of-plane beam deflection and focusing. This metasurface also breaks the degeneracy of clockwise- and counterclockwise-propagating whispering gallery modes in an active microring resonator, leading to on-chip direct orbital angular momentum lasing. Our study shows a viable route toward complete control of light across integrated photonics and free-space platforms and paves a way for creating multifunctional photonic integrated devices with agile access to free space, which enables a plethora of applications in communications, remote sensing, displays, etc.