Food security and livelihood vulnerability are important issues for the economic sustainability of developing countries like Bangladesh. This study examines the influence of total factor productivity (TFP) on the livelihood vulnerability and food security of rice farming households in Bangladesh. Data from 1,841 rice farming households were extracted from the Bangladesh Integrated Household Survey (2015 and 2018) conducted by the International Food Policy Research Institute. Various statistical methods, such as the stochastic frontier model, principal component analysis, path analysis using structural equation modeling, and multivariate regression, were employed to analyze the data. The study utilizes a multivariate modeling approach that combines the stochastic frontier model to determine TFP and sophisticated methodologies to estimate the livelihood vulnerability index (LVI) and women’s empowerment in agriculture index (WEAI). The LVI, household dietary diversity Score (HDDS), TFP, and WEAI scores were 0.454, 10.72, 0.703, and 0.717, respectively. The results indicate a significant relationship between TFP and both LVI and HDDS. Higher TFP is associated with lower LVI and higher HDDS among rice farming households, suggesting that improving TFP can enhance food security and reduce vulnerability. The multivariate regression analysis reveals that TFP, household wealth index, women’s empowerment in agriculture index, per capita food expenditure, household level welfare, and household size have a positive significant impact on HDDS, while TFP is negatively associated with LVI, per capita food expenditure and household size. The findings underscore the importance of increasing TFP to improve food security, reduce livelihood vulnerability, and achieve sustainable development goals in countries like Bangladesh. Higher TFP yields positive outcomes regarding household dietary diversity and livelihood vulnerability, highlighting the need for agricultural policies that prioritize TFP enhancement. Policymakers and professionals can use these findings as a roadmap to implement advanced agricultural policies to achieve food security and reduce livelihood vulnerability. Improving household dietary diversity and reducing livelihood vulnerability can be achieved by focusing on increasing TFP, enhancing household wealth, women’s empowerment, per capita food expenditure, household welfare, and household size. Therefore, increasing TFP should be considered in the design of policies aiming to achieve SDGs Goal 2.