Adaptive-radiation-therapy (ART) is applied to account for anatomical variations observed over the treatment course. Daily or weekly cone-beam computed tomography (CBCT) is commonly used in clinic for patient positioning, but CBCT’s inaccuracy in Hounsfield units (HU) prevents its application to dose calculation and treatment planning. Adaptive re-planning can be performed by deformably registering planning CT (pCT) to CBCT. However, scattering artifacts and noise in CBCT decrease the accuracy of deformable registration and induce uncertainty in treatment plan. Hence, generating from CBCT a synthetic CT (sCT) that has the same anatomical structure as CBCT but accurate HU values is desirable for ART. We proposed an unsupervised style-transfer-based approach to generate sCT based on CBCT and pCT. Unsupervised learning was desired because exactly matched CBCT and CT are rarely available, even when they are taken a few minutes apart. In the proposed model, CBCT and pCT are two inputs that provide anatomical structure and accurate HU information, respectively. The training objective function is designed to simultaneously minimize (1) contextual loss between sCT and CBCT to maintain the content and structure of CBCT in sCT and (2) style loss between sCT and pCT to achieve pCT-like image quality in sCT. We used CBCT and pCT images of 114 patients to train and validate the designed model, and another 29 independent patient cases to test the model’s effectiveness. We quantitatively compared the resulting sCT with the original CBCT using the deformed same-day pCT as reference. Structure-similarity-index, peak-signal-to-noise-ratio, and mean-absolute-error in HU of sCT were 0.9723, 33.68, and 28.52, respectively, while those of CBCT were 0.9182, 29.67, and 49.90, respectively. We have demonstrated the effectiveness of the proposed model in using CBCT and pCT to synthesize CT-quality images. This model may permit using CBCT for advanced applications such as adaptive treatment planning.