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.