Provided herein is a 3D printing system and related compositions, and method of using such, that can produce a polymeric microfiber having embedded microspheres encapsulating an active agent with micron precision and high spatial and temporal resolution. One aspect of the present disclosure provides a method of forming a biocompatible scaffold. Another aspect provides a method of forming a polymeric fiber having a microencapsulated agent distributed in the polymeric fiber. Another aspect provides a composition including a polymeric microfiber produced by 3D printing.