This article investigates the distributed optimization problem of second-order multi-agent systems under directed communication topologies, and proposes a distributed control algorithm for fixed-time convergence. The control algorithm is based on a novel distributed estimator design, enabling each intelligent agent to accurately estimate the gradient of the global objective function through local information exchange. Building upon the estimator, a distributed algorithm with fixed convergence time is devised for each intelligent agent, ensuring that all entities converge to the optimal solution of the objective function within a finite time. The stability of the algorithm is theoretically proven using fixed-time convergence theory and inequality scaling techniques, and the effectiveness of the proposed algorithm is demonstrated through numerical simulations.