We propose a prepayment model of mortgage based on a structural approach in order to analyze prepayment risk of mortgage-backed securities (MBS). We introduce a continuous process named prepayment cost process. Specifically, each mortgager's prepayment time is defined by the first time when her or his prepayment cost process falls below zero, but prepayment cost processes are supposed to be unobservable in the market. We also introduce a risk unique to each loan pool of mortgages, called a loan pool risk (LPR), and we regard LPR as a systematic risk other than interest rate. Using the model, we discuss the conditional distribution of prepayment times and a risk-neutral valuation of pass-through MBS. It is shown that each mortgager's conditional non-prepayment probability and the posterior distribution of LPR play quite important roles in our study.