Dynamics of pseudoscalar mesons ($\pi$, $\eta$, $K$ and $\overline{K}$ ) and hyperons ($\Lambda$ and $\Sigma$) produced in heavy-ion collisions near threshold energies has been investigated within the Lanzhou quantum molecular dynamics (LQMD) transport model. The in-medium modifications on particle production in dense nuclear matter are implemented in the model through corrections on the elementary cross sections and by inclusion of the meson (hyperon)-nucleon potentials, in which the isospin effects are considered. It is found that the transportation of particles are influenced with the in-medium corrections. The total number of pions is reduced with an isospin, density and momentum dependent pion-nucleon potential. However, the ratios of charged pions is enhanced with inclusion of the potential. The production of eta in the domain of mid-rapidities and high momenta is sensitive to the $\eta$-nucleon potential, but weakly depends on symmetry energy. The attractive antikaon-nucleon potential enhances the subthreshold $\overline{K}$ production and also influences the structure of phase-space distributions. Dynamics of etas, kaons, antikaons and hyperons is also influenced by the pion potential because of collisions between pions and nucleons (resonances). The impacts of mean-field potentials on particle dynamics are investigated, such as the phase-space distributions from rapidity and transverse momentum spectra, inclusive invariant spectra, collective flows etc.