Preferential attachment is a popular model of growing networks. We consider a generalized model with random node removal, and a combination of preferential and random attachment. Using a high-degree expansion of the master equation, we identify a topological phase transition depending on the rate of node removal and the relative strength of preferential vs. random attachment, where the degree distribution goes from a power law to one with an exponential tail.