SummaryMobile edge computing (MEC) necessitates cost‐effective deployment for executing scientific workflows with different tasks and datasets, which provides computing, storage and network control at the network edge. However, the execution of scientific workflows in MEC results in heavy costs of data placement including data transmission and data storage. Although there are solutions for data placement in traditional cloud computing, they cannot effectively respond to the latency‐sensitive property of scientific workflows, which leads to the excessive costs of data placement. To cope with this problem, we combine the advantages of MEC and cloud computing and propose a genetic algorithm particle swarm optimization (GAPSO) based method to explore the optimal strategy of data placement for scientific workflows in MEC. First, a unified model of data placement is designed to explore a cost‐effective strategy, which considers the different characteristics between MEC and cloud computing as well as the impact of latency constraint on transmission costs. Next, the advantages of genetic algorithm (GA) and particle swarm optimization (PSO) are integrated to optimize the proposed model, which utilities the fast convergence of PSO and the crossover and mutation operations of GA. Simulations using real‐world scientific workflows show the effectiveness of the proposed method for reducing data placement costs in MEC.