Myocardial perfusion (MP) PET imaging is a powerful tool in risk assessment and stratification of patients with coronary artery disease. Involuntary organ motion degrades cardiac PET image resolution, while respiratory and/or cardiac gating to freeze the motion leads to noisier reconstructed images due to reduced counts in the gated frames. In this work, we propose an MRI-assisted dual motion correction method to compensate for respiratory and cardiac motion in MP PET data and study the impact of dual motion correction on MP defect detection using systematically designed experiments. The proposed dual motion correction method addresses the respiratory motion before correcting the cardiac motion among the respiratory motion corrected cardiac gates. The respiratory motion is estimated from the respiratory-gated only PET images and compensated within a 4D motion-incorporated image reconstruction algorithm. The cardiac motion is then corrected using the motion vector fields estimated from the corresponding cardiac-gated MR images. To evaluate the proposed method, we performed experiments using the standard XCAT phantom and two individual-specific volunteer XCAT phantoms. For each of the three phantoms, we simulated four dual-gated Rb-82 MP PET imaging datasets, one with normal perfusion and the other three with 50% nontransmural, 75% nontransmural, and transmural regionally reduced perfusion. The corresponding cardiac-gated MR images were simulated by the SIMRI simulator, with the sequence specified to be 3D T1-weighted as used in a protocol of a clinical PET/MRI scanner. We quantitatively evaluated the reconstructed images with no motion correction, only respiratory motion correction and dual motion correction, in terms of the myocardium to blood pool contrast and the trade-off between the noise and the normal to defect contrast. Using the channelized Hotelling observer, we performed receiver operating characteristic analysis for the task of detecting perfusion abnormalities with various myocardial coverages. Compared with no motion correction, the respiratory motion correction was demonstrated to improve the myocardium to blood pool contrast as well as the trade-off between the noise and the normal to defect contrast, on top of which the cardiac motion correction furthered the improvement. In the task of detecting regional perfusion defects, transmural or different levels of nontransmural, the respiratory motion correction significantly increased the defect detectability compared with no motion correction. Additionally, the respiratory and cardiac motion correction significantly improved the defect detection compared with the respiratory motion correction alone. Furthermore, the separability of the transmural and nontransmural defects was also improved by the proposed MRI assisted dual motion correction method. The proposed dual respiratory and cardiac motion correction technique improves the accuracy of PET quantification and MP defect detection and classification, which shows its promise for clinical applications especially in cardiac PET/MR imaging.