Compared with normal concrete, ultra high-performance concrete (UHPC) is of increasing interest for bridge engineering because of its superior tensile strength, compressive strength, and significantly enhanced durability. The creep and shrinkage effect have a significant influence on the long-term behavior of UHPC. However, the existing research on the time-dependent behavior of UHPC is still limited. In this research, based on numerical integration method, the ABAQUS user subroutine for simulating creep and shrinkage of both normal concrete (NC) and UHPC were developed by the recursive algorithm of adjacent stress increment in the time history. The accuracy of developed user subroutine was validated by creep and shrinkage test of reinforced NC beams. Subsequently, the long-term creep and shrinkage test of UHPC specimens was conducted with stress to strength ratio of 20%, 30%, and 40%, respectively. Based on the test results and the CEB-FIP Model code 1990, the simplified design formulas for predicting creep and shrinkage of UHPC were proposed respectively based on the developed UHPC material. In the proposed design formulas, the final shrinkage strain was 145 με, and the final creep coefficient was 0.46 for the developed UHPC specimens based on the test environment condition. The comparison between the test result and proposed formulas indicated good applicability and accuracy of the proposed formulas. Based on the developed ABAQUS user subroutine and the proposed design formula for creep and shrinkage, the finite element (FE) models of RC beam and UHPC beam were developed. The influence of creep and shrinkage on the long-term mechanical behavior of simply supported prestressed beams were investigated.