A system and method for magnetic resonance imaging is provided. The method includes acquiring a first set of MR signals and a second set of MR signals by applying a pulse sequence on a subject. The method also includes obtaining a first data line by filling the first set of MR signals into k-space along a first trajectory, and obtaining a second data line by filling the second set of MR signals into k-space along a second trajectory. The method also includes determining a candidate k-space shift based on the first data line and the second data line, and determining a candidate gradient delay based on the candidate k-space shift obtained in each of a plurality of iterations. The method also includes reconstructing an image of the subject based on the candidate gradient delay obtained in the last iteration.