The effect of a compost based on cow dung and sawdust on the production and nutritional quality of tomatoes was evaluated. The compost was prepared by mixing the different constituents in variable mass/mass proportions: 25/75, 50/50, 75/25 and 100/0. The experimental device for growing tomatoes in pots was made in completely randomized random blocks with 5 repetitions, and 3 compost/soil mass/mass proportions (5%, 10% and 15%) for each variant. The physicochemical, biological and biochemical parameters of the compost and amended soils, the production and the nutritional quality of the fruits were evaluated. The C3 variant of compost showed the highest pH (9.88 ± 0.01); C4 presented the highest C/N ratio (21.45 ± 0.42); C2 showed the highest contents of nitrogen, phosphorus, magnesium, calcium, potassium, and sodium, the highest values of bacterial and fungal flora and cellulase, protease, β-glucosidase, acid and alkaline phosphatase activities. Analysis of amended soils showed that: C2 (15%) has the highest pH. C1 (10%) presented the highest C/N ratio (42.12 ± 3.98) and C3 (15%) the highest contents of nitrogen, magnesium ions and calcium. C4 (15%) presented the highest potassium and sodium content. The compost significantly improved tomato production. The C2 (15%) compost was the most productive with 154 ± 3.00 fruits, 10 times more than the tomato produced with chemical fertilizer (15.00 ± 1.00 fruits). The Biological tomato showed higher proportions of ash, total sugars, lycopene, vitamin C and polyphenols than the chemical tomato. The results show that the organic treatment improved the physicochemical, biological and biochemical properties of the soil, the production and the nutritional quality of the tomato. The compost constitutes therefore an efficient method for sustainable agriculture.