Cell migration through extracellular matrices is critical to many physiological processes, such as tissue development, immunological response and cancer metastasis. Previous models including persistent random walk (PRW) and Lévy walk only explain the migratory dynamics of some cell types in a homogeneous environment. Recently, it was discovered that the intracellular actin flow can robustly ensure a universal coupling between cell migratory speed and persistence for a variety of cell types migrating in the in vitro assays and live tissues. However, effects of the correlation between speed and persistence on the macroscopic cell migration dynamics and patterns in complex environments are largely unknown. In this study, we developed a Monte Carlo random walk simulation to investigate the motility, the search ability and the search efficiency of a cell moving in both homogeneous and porous environments. The cell is simplified as a dimensionless particle, moving according to PRW, Lévy walk, random walk with linear speed-persistence correlation (linear RWSP) and random walk with nonlinear speed-persistence correlation (nonlinear RWSP). The coarse-grained analysis showed that the nonlinear RWSP achieved the largest motility in both homogeneous and porous environments. When a particle searches for targets, the nonlinear coupling of speed and persistence improves the search ability (i.e. find more targets in a fixed time period), but sacrifices the search efficiency (i.e. find less targets per unit distance). Moreover, both the convex and concave pores restrict particle motion, especially for the nonlinear RWSP and Lévy walk. Overall, our results demonstrate that the nonlinear correlation of speed and persistence has the potential to enhance the motility and searching properties in complex environments, and could serve as a starting point for more detailed studies of active particles in biological, engineering and social science fields.