Two-dimensional (2D) hybrid perovskite sandwiched between two long-chain organic layers is an emerging class of low-cost semiconductor materials with unique optical properties and improved moisture stability. Unlike conventional semiconductors, ion migration in perovskite is a unique phenomenon possibly responsible for long carrier lifetime, current-voltage hysteresis, and low-frequency giant dielectric response. While there are many studies of ion migration in bulk hybrid perovskite, not much is known for its 2D counterparts, especially for ion migration induced by light excitation. Here, we construct an exfoliated 2D perovskite/carbon nanotube (CNT) heterostructure field effect transistor (FET), not only to demonstrate its potential in photomemory applications, but also to study the light induced ion migration mechanisms. We show that the FET I-V characteristic curve can be regulated by light and shows two opposite trends under different CNT oxygen doping conditions. Our temperature-dependent study indicates that the change in the I-V curve is probably caused by ion redistribution in the 2D hybrid perovskite. The first principle calculation shows the reduction of the migration barrier of I vacancy under light excitation. The device simulation shows that the increase of 2D hybrid perovskite dielectric constant (enabled by the increased ion migration) can change the I-V curve in the trends observed experimentally. Finally, the so synthesized FET shows the multilevel photomemory function. Our work shows that not only we could understand the unique ion migration behavior in 2D hybrid perovskite, it might also be used for many future memory function related applications not realizable in traditional semiconductors.