Traditional economic manufacturing quantity (EMQ) model addressed the perfect production for product. However, there possibly exists the defective product in the production process. In this paper, we present a modified EMQ model with shortage based on considering the product revenue and the inventory cost. The economic production run length, the maximum shortage level, and the optimal warranty period are simultaneously determined for obtaining the maximum expected total profit per year. The numerical example and the sensitivity analysis are further provided for illustration.