Marx considers various social classes in The Manifesto of the Communist Party, among them: the bourgeoisie, the proletariat, the middle class, and the 'dangerous' classes of social scum. Marx was in a fairly high position in his life, but I do not believe he would call himself a member of the bourgeoisie. But I'm not sure he could justify himself being a member of the proletariat. Reading through the Communist Manifesto I didn't see him address this, but I admit I may have missed it. So, which class would Marx consider himself a member of?
The bourgeoisie in Marx' class theory was the caste of entrepreneurs which employed people from the proletariat to work for them and increase their capital.
Marx made most of his income as a self-employed writer. So he was neither a proletarian who was exploited by his employer nor an employer who exploited his workers.
However, his writing provided him with enough income to not being required to resort to criminal activity or begging to survive, so he was not a member of the social scum (unless, of course, you consider his writings themselves as criminal activity, as some of his opponents did).
This made him a member of the middle class or "petite bourgeoisie" as Marx called it.
Karl Marx would consider himself a member of the middle class. Marx was fortunate to be born into a wealthy middle-class family in Trier in the Prussian Rhineland. After studying at the universities of Bonn, Berlin and Jena, Marx developed theories about society, economics and politics with the help of his lifelong friend, Friedrich Engels (who was also born to a wealthy family).
Although he had an affluent upbringing, Marx developed philosophical ideas of socialism later in his life, especially after his university education. He first became interested in the ideas of the Young Hegelians, a group of German intellectuals who developed radical left-wing ideas of the Prussian political system. Later, he began to write for several radical newspapers when he met Engels. His radical views against the government caused him to be exiled to London, where he continued writing and formulating theories about social and economic systems, and also campaigned for socialist movements.
It may seem odd that two men born to wealthy families would grow up to write The Manifesto of the Communist Party, but it is not uncommon for people like Marx to stand up for the less fortunate. Marx's thinking can be compared to the "Enlightenment" thinking of the 18th century, in which people of all walks of life developed ideas of a radically different governmental or economic system.
Marx’s theories of class are centred in a contradiction between on one hand the emergent economically dominant actual social relations of production; and, on the other hand the limited capacity of humans to describe actuality in theoretical models. For example, in capitalism, Marx describes “the value form” (Capital I, ch1) as the dominant social relationship in his surrounding society which is actively obliterating all prior social relationships by the imposition of wage labour and profit. So for his society Marx views capitalism, as a system of relationships, as both creating the two fundamental class positions: capitalist and proletarian; and the two key actual classes: capitalists and proletarians.
Next to this theoretical summary of a dominant relationship from what relationships Marx actually thinks exist; there are other non-dominant class relationships. These include bound rent and tithe subsistence peasants. Small cash rent market tenant croppers. Large employing farmers who use premodern brutality on semi-peasants. Stipendiary priests and scholars. Bondage slaves not in modern production. Rentier aristocrats bound up with non-capitalist productive land. Small owner-maker petits-bourgeois who used to work in feudal cities. There are lots of actual class positions, but capitalism reduces these ways of being to wage labour or profiting off capital.
Marx as an individual has two contradictory relationships with class. Firstly he produces information for as a petits-bourgeois household. Second he was a kept man who Engels paid a stipend to, this stipend derived from Engels profit as a factory owner. Marx was simultaneously petits-bourgeois and bourgeois. Marx benefitted from primitive household production for market sale of information. Marx benefitted from profit from control of capital.
Marx according to his own views was thoroughly bourgeois.
To quote Marx and Marxism by Peter Worsley
Marx, it is true, was not a good manager when he did have money, largely because of his bourgeois background: servants and piano lessons were necessities (just as few of his followers, though they claim not to deify him, admit that he could be quite racist in some of his more spontaneous utterances). When young, he could enjoy a night out drinking with friends, on one occasion quite riotously. But normally, he was a quite orthodox Victorian paterfamilias. He hugely enjoyed family life, outings on Hampstead Heath, evening poetry-readings and musical entertainments, and could even tell an unfortunate suitor for his daughter’s hand that he should cool his passionate behaviour and adopt instead ‘a manner that conforms with the latitude of London’, whilst haughtily inquiring whether his economic position was adequate to support his daughter properly. At the end of his life, he was able to resume a style of life more in keeping with his origins, and attempt to recover his ruined health by visits to Carlsbad, Geneva, Monte Carlo and even Algiers (where he shaved off his beard).
In other words, as the other answers have already described, Marx was not a proletarian - neither culturally nor in terms of his position in society and the occupation. What is worth adding however, is that this was the case of many of his collaborators and followers, and they have eventually built a whole theory of revolutionary vanguard, justifying the inclusion of intellectuals who possessed the theoretical knowledge and understanding necessary to wake up, educate and lead the masses:
The Communists, therefore, are, on the one hand, practically the most advanced and resolute section of the working-class parties of every country, that section which pushes forward all others; on the other hand, theoretically, they have over the great mass of the proletariat the advantage of clearly understanding the lines of march, the conditions, and the ultimate general results of the proletarian movement. The immediate aim of the Communists is the same as that of all other proletarian parties: Formation of the proletariat into a class, overthrow of the bourgeois supremacy, conquest of political power by the proletariat.
This logic would eventually culminate in the concept of the leading role of the communist party, as defined by Artcile 6 of the Soviet constitution:
The leading and guiding force of the Soviet society and the nucleus of its political system, of all state organisations and public organisations, is the Communist Party of the Soviet Union. The CPSU exists for the people and serves the people.
The Communist Party, armed with Marxism–Leninism, determines the general perspectives of the development of society and the course of the home and foreign policy of the USSR, directs the great constructive work of the Soviet people, and imparts a planned, systematic and theoretically substantiated character to their struggle for the victory of communism.
All party organisations shall function within the framework of the Constitution of the USSR.
Amending this article in 1990 was considered as a major step in transforming the USSR to a democratic state.