Enhancing the utilization of absorbed light is essential for enhancing the efficiency of solar energy conversion via artificial photosynthesis. In this work, we report the successful incorporation of Rhodamine B (RhB) into the pore of ZIF-8 (ZIF = zeolitic imidazolate framework) and the efficient energy transfer process from RhB to Co-doped ZIF-8. Using transient absorption spectroscopy, we show that energy transfer only occurs from RhB (donor) to Co center (acceptor) when RhB is confined into the ZIF-8 structure, which is in stark contrast to the system based on the physical mixture of RhB with Co-doped ZIF-8, where negligible energy transfer was observed. In addition, energy transfer efficiency increases with the concentration of Co and reaches a plateau when the molar ratio of Co to RhB reaches 32. These results suggest that RhB confined in the ZIF-8 structure is essential for energy transfer to occur, and energy transfer efficiency can be controlled by tuning the concentration of acceptors.