There exist numerous high-dimensional problems in the real world which cannot be solved through the common traditional methods. The metaheuristic algorithms have been developed as successful techniques for solving a variety of complex and difficult optimization problems. Notwithstanding their advantages, these algorithms may turn out to have weak points such as lower population diversity and lower convergence rate when facing complex high-dimensional problems. An appropriate approach to solve such problems is to apply multi-agent systems along with the metaheuristic algorithms. The present paper proposes a new approach based on the multi-agent systems and the concept of agent, which is named Multi-Agent Metaheuristic (MAMH) method. In the proposed approach, several basic and powerful metaheuristic algorithms, including Genetic Algorithm (GA), Particle Swarm Optimization (PSO), Artificial Bee Colony (ABC), Firefly Algorithm (FA), Bat Algorithm (BA), Flower Pollination Algorithm (FPA), Gray Wolf Optimizer (GWO), Whale Optimization Algorithm (WOA), Crow Search Algorithm (CSA), Farmland Fertility Algorithm (FFA), are considered as separate agents each of which sought to achieve its own goals while competing and cooperating with others to achieve the common goals. In overall, the proposed method was tested on 32 complex benchmark functions, the results of which indicated effectiveness and powerfulness of the proposed method for solving the high-dimensional optimization problems. In addition, in this paper, the binary version of the proposed approach, called Binary MAMH (BMAMH), was executed on the spam email dataset. According to the results, the proposed method exhibited a higher precision in detection of the spam emails compared to other metaheuristic algorithms and methods.