Measurement-device-independent quantum key distribution (MDI-QKD) protocol can effectively resist all possible attacks targeting the measurement devices in a quantum key distribution (QKD) system, thus exhibiting high security. However, due to the protocol’s high sensitivity to channel attenuation, its key generation rate and transmission distance are significantly limited in practical applications.To improve the performance of MDI-QKD, researchers have proposed quantum-memory (QM)-assisted MDI-QKD protocol, which has enhanced the protocol's performance to a certain extent. Nevertheless, under finite-size conditions where the total number of transmitted pulses is limited, accurately estimating the relevant statistical parameters is still a challenge. As a result, existing QM-assisted MDI-QKD schemes still encounters issues such as low key rates and limited secure transmission distances.To solve these problems, this work proposes a novel improved finite-size QM-assisted MDI-QKD protocol. By utilizing quantum memories to temporarily store early-arriving pulses and release them synchronously, the protocol effectively reduces the influence caused by channel asymmetry. Additionally, the protocol introduces a four-intensity decoy-state method to improve the estimation accuracy of single-photon components. Meanwhile, to mitigate the influence of finite-length effects on QM schemes, the proposed protocol combines a collective constraint model and a double-scanning algorithm to jointly estimate scanning error counts and vacuum-related counts. This approach enhances the estimation accuracy of the single-photon detection rate and phase error rate under finite-size conditions, thereby significantly improving the secure key rate of the MDI-QKD system.Simulation results show that under the same experimental conditions, compared with the existing QM-assisted three-intensity decoy-state MDI-QKD protocol and the four-intensity decoy-state MDI-QKD protocol based on Heralded Single-photon Source (HSPS), the proposed protocol extends the secure transmission distance by more than 30 km and 100 km, respectively. This proves that under the same parameter settings, the proposed scheme exhibits significant advantages in both key rate and secure transmission distance. Therefore, this research provides important theoretical references and valuable benchmarks for developing long-distance, high-security quantum communication networks.