Soon after he graduated from the Gymnazium he went to Sofia and there, in 1889-1890, entered the University of Sofia to specialize in history. Here Gruev found the opportunity to study the history of the Bulgarians and particularly the methods and deeds of the Bulgarian revolutionists-Rakovsky, Karavelov, Levsky, Botev, and others-who had been greatly responsible for the freedom of Bulgaria. Gruev now anticipated the idea of following the examples of the Bulgarian revolutionists and he soon endeavored to form a similar organization in Macedonia for the deliverance of the Bulgarians that were still held in bondage by the Sultan.
He left the University and went to Macedonia to apply himself to the organization of the Macedonian people. In order to carry on his scheme of work more successfully and to avert the suspicion of the Turkish authorities he decided to become a school teacher. The first two years after his return to Macedonia he taught school, first in his native village of Smilevo, and later in the town of Prilep. The two years of teaching served him, also, as orientation for the work of the great conspiracy in Macedonia, against the corrupt and rapacious regime of Sultan Abdul Hamid.
Later, Gruev established himself in Salonica and here laid the foundation of the IMRO (The Internal Macedonian Revolutionary Organization). With the cooperation of Dr.Christo Tatarchev, Peter Pop Arsov, and others he formulated the Constitution and By-laws of the IMRO. It was to be a secret organization under the direction of a Central Committee, with local branches of revolutionary committees throughout the Province of Macedonia and the Vilayet of Adrianople. These regions were to be divided into revolutionary districts or rayons. In accordance with the provision of the Constitution, the first Central Revolutionary Committee was organized in the summer of 1894, under the chairmanship of Dr.Christo Tatatrchev.