Nanocarriers are critical for targeting and enhancing drug delivery. However, the use of toxic solvents and complex chemical functionalization have severely limited their clinical translation. Here, a one-step strategy is developed to guide the self-assembly of biocompatible core-shell nanocapsules with tunable surface functions through microfluidic technology. After rapid mixing of ethanol and water in a microfluidic device and solvent exchange, the drug, oil, polymer, and polymer-PEG-function are co-precipitated and self-assembled into core-shell nanocapsules with the desired surface function, driven by energy minimization. The prepared PCL-PEG-FA core-shell nanocapsules showed high encapsulation efficiency and loading capacity, and combined with corresponding receptors on tumor cell membrane through functional groups on the surface of the nanocapsules, showing excellent tumor targeted drug delivery performance both in vitro and in vivo. Immune activation in the tumor microenvironment was studied in detail by flow cytometry and multiple immunohistochemical staining, revealing potential mechanisms for enhancing anti-tumor performance. The developed strategy is green, simple, versatile, and scalable, providing a promising platform for designing advanced nanocarriers with hierarchy and desired functionality to enhance drug delivery.