This study analyzes the data of Taiwan’s electronics industry to understand the antecedents that affect the foreign direct investment decisions. In addition, Industry 4.0 technology can enhance the competitiveness of the firm and adjust corporate strategies. Therefore, we focus the constructs on the R&D investment, internationalization experience, firm size, and degree of using Industry 4.0 as moderating variables. The data come from the TEJ. After empirical analysis, it is found that R&D investment, internationalization experience, and firm size have a positive impact on foreign direct investment. Under the influence of the use of Industry 4.0 technology, it finds that the degree of using of Industry 4.0 strengthens the positive relationship between R&D investment and foreign direct investment. These results have significant theoretical implications for the antecedents of foreign direct investment and provide management suggestions to degree of using Industry 4.0 technology.