Organic fertilizer is produced through composting natural lignocellulose material and liquid wastes especially from livestock production, which has a content of minimum 35% dry matter, minimum 25 weight % of organic material, minimum 20 weight % of humus and minimum 1.5 weight % of nitrogen. The organic fertilizer is produced by spraying sorbent material with waste water, that is livestock waste water or food industry waste water or water cleaning plant sludges. The waste water contains a minimum of 20% weight of livestock waste water, which is homogenized with agent, which includes materials based on starch derivates or cellulose derivates, which increase thixotrophy and surface tension of this waste water and separators, which prevent creation of clusters and increase solubility of starch or cellulose derivates. Sorbent material with waste water is mixed, aerated and decomposed by aerobic bacterial activity in at least four cycles.