The economical determination of lot size with capacity constraints is a frequently complex, problem in the real world. In this paper, a multi-level problem of lotsizing with capacity constraints in a finite planning horizon is investigated. A combination of ant colony algorithm and a heuristic method called shifting technique is proposed for solving the problem. The parameters, including the costs, demands and capacity of resources vary during the time. The goal is to determine the economical lot size value of each product in each period, so that besides fulfilling all the needs of customers, the total cost of the system is minimized. To evaluate the performance of the proposed algorithm, an example is used and the results are compared other algorithms such as: Tabu search (TS), simulated annealing (SA), and genetic algorithm (GA). The results are also compared with the exact solution obtained from the Lagrangian relaxation method. The computational results indicate that the efficiency of the proposed method in comparison to other meta-heuristics.