This paper examines how credit guarantees and government subsidies impact investment in a regime-switching model. We provide new explicit pricing formulas for a general standard asset. Almost all common corporate securities’ prices can be easily derived by the explicit formulas though project cash flows are driven by both a Brownian motion and a two-state Markov chain. We provide a method about how governments should specify a proper tax subsidy standard for a given tax rate to motivate a firm to invest in a project in the way they wish. If the tax subsidy is sufficiently high (low), an overinvestment (underinvestment) occurs. The higher the tax rate, the more significant the overinvestment (underinvestment). We pin down the subsidy amount required for motivating a firm to invest immediately and fix the optimal capital structure with government subsidies.