The "factory-in-a-box" concept involves assembling production modules (i.e., factories) in containers and transporting the containers to different customer locations. Such a concept could be highly effective during emergencies, when there is an urgent demand for products (e.g., the COVID-19 pandemic). The "factory-in-a-box" planning problem can be divided into two sub-problems. The first sub-problem deals with the assignment of raw materials to suppliers, sub-assembly decomposition, assignment of subassembly modules to manufacturers, and assignment of tasks to manufacturers. The second sub-problem focuses on the transport of sub-assembly modules between suppliers and manufacturers by assigning vehicles to locations, deciding the order of visits for suppliers, manufacturers, and customers, and selecting the appropriate routes within the transportation network. This study addresses the second sub-problem, which resembles the vehicle routing problem, by developing an optimization model and solution algorithms in order to optimize the "factory-in-a-box" supply chain. A mixed-integer linear programming model, which aims to minimize the total cost of the "factory-in-a-box" supply chain, is presented in this study. CPLEX is used to solve the model to the global optimality, while four metaheuristic algorithms, including the Evolutionary Algorithm, Variable Neighborhood Search, Tabu Search, and Simulated Annealing, are employed to solve the model for large-scale problem instances. A set of numerical experiments, conducted for a case study of "factory-in-a-box", demonstrate that the Evolutionary Algorithm outperforms the other metaheuristic algorithms developed for the model. Some managerial insights are outlined in the numerical experiments as well. INDEX TERMS Factory-in-a-box, metaheuristics, supply chains, urgent demand, vehicle routing problem.