This paper considers a make-to-order production–inventory system that comprises a production facility and an inventory warehouse. Customers arrive at the facility to place an order, and the orders are processed using the first-come-first-served (FCFS) discipline. The warehouse supplies inventory items (raw materials) for the production process, and the warehouse inventory is replenished by internal production. The speed of internal production can be controlled through additional costs. If the inventory level drops to zero, the unmet demand waits in the facility until the inventory is replenished. During the stockout period, newly arriving demand is lost. The stationary joint probability of unmet demands and inventory items is derived, and a cost model is constructed. The optimal control policy for internal production is investigated to minimize the cost per unit time of the system. The experimental results show that such a production speed adjustment could reduce costs by up to 42% compared to the cases without the adjustment.