The Welsh Government said the rules will be introduced next spring and will come into force in January 2020, with transitional periods for some elements to allow farmers to adapt and ensure compliance.
They will cover measures including manure storage, protection of water from pollution related to when, where and how fertilisers are spread and sustainable fertiliser applications linked to the requirement of the crop.
Lesley Griffiths, Cabinet Secretary for Energy, Planning and Rural Affairs said there are already reports of poor practices being carried out in unsuitable weather conditions this winter.
She added: “This year, we have seen an increase in the number of major polluting incidents, damaging both the environment and reputation of the agricultural industry. Equally damaging, in the context of Brexit, is the impact such incidents have on the work underway on Sustainable Brand Values for Welsh Products.
“The regulations will replicate good practice which many farms are already implementing routinely – this must become the norm. The regulations will enable firm and consistent enforcement to be taken. The regulations will also ensure there are no barriers to trade of agricultural produce with the European Union following Brexit and help us meet national and international obligations on water quality. This is the right thing to do – for the environment, for the economy and for the reputation of farming in Wales.”