Investigating causal relationships in longitudinal studies present two major challenges: imperfect compliance and missing data (Frangakis and Rubin (1999), Yau and Little (1999)). Imperfect compliance occurs when some of the subjects do not comply with the treatment assigned and missing data occur when subjects prematurely drop out of the study before the study ends. Ignorance of these two challenges while investigating causal relationships leads to biased results. Currently, there is no statistical methodology to handle both of these challenges simultaneously in a causal mediation framework. Causal mediation analysis (see e.g. Robins & Greenland, 1992; Pearl, 2001; Imai, Keele & Yamamoto, 2010; VanderWeele, 2015) is a statistical framework that enables researchers to investigate causal mechanisms in the presence of a mediator, which is an independent variable that is believed to have an effect on the outcome through an effect on another variable (treatment). We aim to address this need by developing a novel method to investigate the causal mechanisms between the treatment and the outcome of interest under imperfect compliance and missing data.