Current Mendelian randomization (MR) methods do not reflect complex relationships among multiple exposures and outcomes as is typical for real-life applications. We introduce MrDAG the first MR method to model dependency relations within the exposures, the outcomes, and between them to improve causal effects estimation. MrDAG combines three causal inference strategies in a unified manner. It uses genetic variation as instrumental variables to account for unmeasured confounders. It performs structure learning to detect and orientate the direction of the dependencies within exposures and outcomes. Finally, interventional calculus is employed to derive principled causal effect estimates. MrDAG was motivated to unravel how lifestyle and behavioural exposures impact mental health. It highlights education and smoking as key effective points of intervention given their down-stream effects on mental health. These insights would have been difficult to delineate without modelling the causal paths between multiple exposures and outcomes at once.