In general, face recognition systems are not robust against illumination variation; in this study, we propose a learning-based framework to reconstruct a face in different lighting conditions in order to improve the performance of downstream applications such as automatic face recognition. The proposed framework is based on conditional variational autoencoder (CVAE) network to disentangle the identity and the shadow effect. Our proposed framework doesn’t need to label the shadow area of faces in any way. It is trained with a loss function to better preserve the identity and reconstruction result. YaleB face database with illumination variation are used for training and evaluation purpose. The experimental results show that the proposed framework can automatically remove shadows from a single image.