Mortgage is one of the most popular instruments in the financial markets. In this study, we consider three actions, i.e., to default, to prepay, and to maintain the mortgage, that a borrower may have in mortgage horizon. We provide an effective pricing formula, which not only considers the effect that default might affect the mortgage value, but also accurately computes the impact due to prepayment risk. Our model defines the prepayment value of the mortgage as the amount of outstanding principal, in contrast to defining prepayment value as a constant proportion of maintaining value of the mortgage. We present a new closed-form pricing formula of risky mortgage and also derive its yield to maturity, duration and convexity to provide a framework for risk management.