In this paper we describe the facile reversible UV-controlled and fast transition from emulsion to gel by using a photoresponsive polymer with a malachite green group. The photoresponsive polymer with the hydrophobic malachite green group can be used for the formation of an oil-in-water emulsion. However, upon UV irradiation of 5 min, the photochromic malachite green group could be ionized to its corresponding cation, leading to the transformation from emulsion to gel. Upon shaking, such gel can recover the emulsion state, and further UV irradiation can turn the emulsion into gel again. Such transition from emulsion to gel by photochemical reaction and reverse shaking treatment can be repeated several times. It is anticipated greatly that this line of research may provide new insight into the mechanism behind stimuli-responsive systems, facilitating the design and synthesis of new responsive molecules for the fabrication of stimuli-responsive materials with designed functions.