This paper investigates the impact of ordering cost reduction and process quality improvement on an integrated vendor–buyer inventory system with variable lead time in just-in-time (JIT) manufacturing environment. We assume that the vendor invests money in order to improve the production process quality and reduce the number of defectives, and buyer invests money to reduce the ordering cost. Each lot received by the buyer contains a certain percentage of defective items and it is assumed that there is an inspection activity on the part of the buyer with a fixed screening rate greater than the demand rate. Shortages are partially backlogged with a certain limit of backorder price discount. The objective of this study is to obtain the optimal decisions and the best investment policy to minimise the joint total cost incurred by the buyer and the vendor. An efficient algorithm is developed to determine the optimal policy. The model is illustrated through a numerical example. From the numerical results, it is observed that significant savings can be achieved through the reductions of lead time, ordering cost and defective rate. Some managerial insights also obtained from the numerical study.