In the industries of petroleum extraction, a large volume of oily sludge is being generated. This waste is usually considered difficult to dispose of, causing environmental and economic issues. This study presented the novel experimental method of manufacturing mortar used in civil construction by cement and oily sludge ash (OSA). The defined method was described with a logical experimental study conducted to examine a feasible manufacturing method for casting cement-based mortars by partially replacing cement with OSA. Replacement concentrations for OSA ranged from 0 to 20 percent by cement weight, while the water-to-cement (w/c) ratio was varied from 0.4 to 0.8, and the amount of sand was kept constant. The strengths and absorption rate of the mortar were monitored for 28 days. The OSA contains a crystalline structure with packs of angular grains. Because of OSA in the cement-based mortar mixtures and water-to-cement ratios, the mechanical strength was improved significantly. However, the water absorption trend increased linearly. Using variance analysis, the influence of OSA and w/c ratio on the behavior of mortar was acquired. The developed models were significant for all p-value reactions of <5%. Numerical optimization results showed that the best mixture can be obtained by replacing 8.19 percent cement with OSA and 0.52 as a ratio of w/c.