With the rapid development of society and the continuous change of the times, my country's Internet technology has achieved great development space. Cloud computing, Internet of Things, etc. have formed the current era of big data. At present, there are a lot of network access points, and the networked devices among them will generate a lot of data, so there are higher requirements for the security of the cyberspace, and it is also a golden opportunity. Traditional cyberspace security research is relatively inefficient in data processing, machine learning has strong adaptability, and strong learning capabilities also ensure the security of cyberspace. Under such a social background, it is necessary to give full play to the role of machine learning. After applying machine learning, it can effectively solve the problems existing in cyberspace security research. Based on this, this paper discusses the application of machine learning in cyberspace security research.