Reduction of environmental mineral pollution, while maintaining profitability, is one of the major challenges faced by the pig industry today. This paper describes a computer-based growth simulation study undertaken to demonstrate how economic profitability can be maintained whilst the environmental effects associated with nitrogen wastes are minimised. For this purpose, a computer program linking a linear program, a stochastic pig growth model and a genetic algorithm (GA) was developed. The objective function to be maximised by the GA is the weighted difference of gross margin and nitrogen excretion cost. Simulations were conducted to investigate how different pig genotypes (fat, normal, lean) and different relative economic weighting of gross margin (1) and nitrogen excretion (0, 1, 5, 10, 20, 40, 80 or 120) affect the nitrogen excretion and profitability under practical or GA optimised feeding strategies in Switzerland. In all the cases investigated, nitrogen excretion is reduced and profitability increased when the pigs are from a leaner genotype. Across all genotypes a 45% reduction in nitrogen excretion can be achieved with only a 3.5% drop in profitability when diets designed to maximise profitability and minimise nitrogen excretion are fed. The maximal nitrogen retentions observed were 44.9%, 52.6% and 57% for the fat, normal and lean genotypes respectively. It is concluded that a more sustainable pork meat production system can be achieved by using better genotypes and optimising the diet composition.