In this paper we solve the dynamic optimal Ramsey taxation problem in a model with incomplete markets, where the government commits itself ex-ante to a time path of labor taxes, capital taxes and debt to maximize the discounted sum of agents' utility starting from today. Whereas the literature has largely been limited to choosing policies that maximize steady state welfare only, we instead characterize the optimal pol- icy along the full transition path. We show theoretically that in the long run it is optimal to equalize the pre-tax return on capital and the rate of time preference, i.e. the capital stock satisfies the modified golden-rule. Furthermore we prove that the long run steady state resulting from an infinite sequence of optimal policy choices is independent of the initial conditions. Quantitatively we find that the optimal policies are sensitive to the underlying income process and the elasticity of labor supply. Capital taxes are always significantly positive, although for all calibrations relatively low compared to most de- veloped economies. In our benchmark calibration, aimed at resembling the high income inequality in the U.S. and with a Frisch elasticity of labor supply equal to one, the long- run taxes on capital and labor are around 11 and 77 percent and the debt-to-GDP ratio is about 4. Along the optimal transition to the steady-state, labor taxes are initially lowered, financed by issuing more debt, before they are eventually increased to their steady-state level.