In the era of mass customization, designing optimal products is one of the most critical decision-making for a company to stay competitive. More and more customers like customized products, which will bring challenges to the product line design and the production. If a company adopts consumers' favorite levels, this may lead to lower product reliability, or incompatibility among the components that make up the product. Moreover, it is worth outsourcing certain attribute levels so as to reduce production cost, but customers may dislike these levels because of their delivery delay. If managers consider the compatibility issue, the quality issue, outsource determination, and the delivery due date in the product design and production stages, it will avoid unreasonable product configuration and many unnecessary expenses, thereby bringing benefits to the company. To solve this complicated problem, we establish a nonlinear programming model to maximize a metric about profit, termed as Per-capita-contribution Margin considering Reliability Penalty (PMRP). Since the integrated product line design and production problem is NP-hard, we propose an improved Discrete Imperialist Competitive Algorithm (DICA) that can find a most powerful imperialist (i.e., solution) by the competition among all countries in the world. The proposed DICA is compared with genetic algorithm (GA) and simulated annealing (SA) through extensive numerical experiment, and the results show that DICA has more attractive performance than GA and SA.