Friction stir welding (FSW) has become one of the most used solid-state joining methods because of the increased mechanical properties and weld quality that can be obtained. The present investigation focuses on the effects of Titanium Carbide nanoparticles (TiCnp) reinforcement with the welds of AZ31 magnesium alloy using the grey relational coefficient optimization technique with the aid of artificial neural networks (ANNs) for modeling. The parameters considered are TiCnp content of approximately 1.5wt.%, tool inclination angle of 0∘, 1∘, and 2∘, tool spindle speed of 1000, 1250, and 1500rpm, tool geometry square, cylinder, and triangle, feed rate of 25, 50, and 75mm/min and axial force of 5, 10, and 15kN. Other mechanical properties determined involve microhardness, Tensile Strength (TS), wear rate (WR), and impact strength (IS). The results show the improvement of mechanical properties with an increase in TiCnp concentration within the range which implies that the highest TS of 242MPa is obtainable when the amount of TiCnp is optimally added. Interestingly, while identifying the optimal parameters for mechanical properties, it was ascertained that 1250rpm of rotational speed (RS), 50mm/min of traverse speed (TS), 1∘ of tilt angle (TA), and square tool profile shape were found to have the best results. Similar findings were backed up by the ANN models whereby the introduction of TiCnp into the AZ31Mg alloy boosts TS to about 130MPa, microhardness to 70MPa and IS to about 89.34MPa, and lowers WR to 0.0046m3/m. This integrated approach highlights the possibility of applying ANN coupled with grey relational analysis for the improvement of FSW process for improving the material characteristics.