We demonstrate five-degree-of-freedom (5-DOF) wireless magnetic control of a fully untethered microrobot (3-DOF position and 2-DOF pointing orientation). The microrobot can move through a large workspace and is completely unrestrained in the rotation DOF. We accomplish this level of wireless control with an electromagnetic system that we call OctoMag. OctoMag's unique abilities are due to its utilization of complex nonuniform magnetic fields, which capitalizes on a linear representation of the coupled field contributions of multiple soft-magnetic-core electromagnets acting in concert. OctoMag was primarily designed to control intraocular microrobots for delicate retinal procedures, but it also has potential uses in other medical applications or micromanipulation under an optical microscope.