This study delves into the factors that boost agricultural productivity while taking five macroeconomic variables into account. The investigated variables are agricultural productivity, which is used as the dependent variable, while employment in agriculture, gross capital formation, arable land, and rainfall are the independent variables. Employing an autoregressive distributed lags (ARDL) model, this paper examines the determinants of agricultural productivity in Somalia from 1991 to 2020. The cointegration between the model’s variables was verified using a bounds-testing approach to cointegration. Employment in agriculture was found to have both a short-run and long-run positive impact on agricultural productivity. Similarly, it was discovered that both gross capital formation and the availability of arable land had a favorable influence on agricultural productivity in the short and long run. Additionally, the study indicated a positive short-run and long-run correlation between rainfall and agricultural productivity, although this correlation is statistically insignificant at a five percent level. In the long run, the amount of available arable land has a positive impact on agricultural productivity. However, in the short run, this determinant has the opposite effect. Based on the results, the study advises the government, policymakers, and other concerned authorities to prioritize technological innovation and climate-smart agricultural systems to boost sector productivity.