A trimethylamine (TEA)-assisted synthesis approach that combines the preparation of hierarchical porous zeolitic imidazolate framework ZIF-8 nanoparticles and one-pot encapsulation of target molecules is presented. Two dye molecules, rhodamine B (RhB) and methylene blue (MB), and one protein (bovine serum albumin, BSA) were tested as the target molecules. The addition of TEA into the solution of zinc nitrate promoted the formation of ZnO nanocrystals, which rapidly transformed to ZIF-8 nanoparticles after the addition of the linker 2-methylimidazole (Hmim). Hierarchical porous dye@ZIF-8 nanoparticles with high crystallinity, large BET surface areas (1300-2500 m2/g), and large pore volumes (0.5-1.0 cm3/g) could be synthesized. The synthesis procedure was fast (down to 2 min) and scalable. The Hmim/Zn ratio could be greatly reduced (down to 2:1) compared to previously reported ones. The surface areas, and the mesopore size, structure, and density could be modified by changing the TEA or dye concentrations, or by postsynthetic treatment using reflux in methanol. This synthesis and one-pot encapsulation approach is simple and can be readily scaled up. The photophysical properties such as lifetime and photostability of the dyes could be tuned via encapsulation. The lifetimes of the encapsulated dyes were increased by 3-27-fold for RhB@ZIF-8 and by 20-fold for MB@ZIF-8, compared to those of the corresponding free dyes. The synthesis approach is general, which was successfully applied for encapsulation of protein BSA. It could also be extended for the synthesis of hierarchical porous cobalt-based ZIF (dye@ZIF-67).