Studies related to oil and gas wells have attracted worldwide interest due to the increasing energy shortfall and the requirement of sustainable development and environmental protection. However, the state of oil and gas wells in terms of research characteristics, technological megatrends, article-produced patterns, leading study items, hot topics, and frontiers is unclear. This work is aimed at filling the research gaps by performing a comprehensive bibliometric analysis of 6197 articles related to oil and gas wells published between 1900 and 2021. VOSviewer and CiteSpace software were used as the main data analysis and visualization tools. The analysis shows that the annual variation of article numbers, interdisciplinary numbers, and cumulative citations followed exponential growth. Oil and gas well research has promoted the expansion of research fields such as engineering, energy and fuels, geology, environmental sciences and ecology, materials science, and chemistry. The top 10 influential studies mainly focused on shale gas extraction and its impact on the environment. More studies were produced by larger author teams and inter-institution collaborations. Elkatatny and Guo have greatly contributed to the application of artificial intelligence in oil and gas wells. The two most contributing institutions were the Southwest Petr Univ and China Univ Petr from China. The People’s Republic of China, the US, and Canada were the countries with the most contributions to the development of oil and gas wells. The authoritative journal in engineering technology was J Petrol Sci Eng, in environment technology was Environ Sci Technol, in geology was Aapg Bull, and in materials was Cement Concrete Res. The keyword co-occurrence network cluster analysis indicated that oil well cement, new energy development, machine learning, hydraulic fracturing, and natural gas and oil wells are the predominant research topics. The research frontiers were oil extraction and its harmful components (1992–2016), oil and gas wells (1997–2016), porous media (2007–2016), and hydrogen and shale gas (2012–2021). This paper comprehensively and quantitatively analyzes all aspects of oil and gas well research for the first time and presents valuable information about active and authoritative research entities, cooperation patterns, technology trends, hotspots, and frontiers. Therefore, it can help governments, policymakers, related companies, and the scientific community understand the global progress in oil and gas well research and provide a reference for technology development and application.