The purpose of this paper is to provide a model for analyzing the structural relationship between the components of the national innovation ecosystem. For this purpose, cross-sectional data from 137 countries, structural equation modeling technique with partial least squares method and PLS software have been used. Hence, it is a quantitative applied research conducted with a descriptive (correlation) approach. Experimental analysis shows that the diverse components of the innovation ecosystem play an essential role in fostering innovation. Information technology, university education, academic research, and innovative interactions are key components of the national innovation ecosystem. The quantity, quality and capacity of these components determine the degree of creativity, productivity, dynamics and agility level of the innovation ecosystem. The quantity and quality of entrepreneurship, the amount of access to finance, the quantity and quality of physical infrastructure, and the amount of financial and physical investment provided by entrepreneurs, government and firms help foster, grow and expand innovation. This component, in addition to generating knowledge within the ecosystem and absorbing knowledge from the outside, helps to commercialize new knowledge. The diffusion and dissemination of knowledge in ecosystems and ecological sustainability are key outputs of the national innovation ecosystem. Based on these results, the paper proposes six strategies for building a national innovation ecosystem in Iran.