Application of ultra-high-performance concrete (UHPC) in joints can improve the impact resistance, crack resistance, and durability of structures. In this paper, the direct shear performance of ultra-high-performance concrete (UHPC) adhesive joints was experimentally studied. Twenty-four direct shear loading tests of UHPC adhesive joints were carried out considering different interface types and constraint states. The failure modes and load-slip curves of different interfaces were studied. Results indicated that passive confinement could enhance the strength and ductility of the interface; the average ultimate bearing capacity of the smooth, rough, grooved, and keyway specimens with passive restraint were, respectively, increased by 11.92%, 8.91%, 11.93%, and 17.766% compared with the unrestrained ones. The passive constraint force changes with the loading and finally tends to be stable. The epoxy adhesive has high reliability as a coating for the UHPC interface. The adhesive layer is not cracked before the failure of the specimen, which is also different from the common failure mode of adhesive joints. Failure of all specimens occurred in the UHPC layer, and the convex part of the groove interface shows the UHPC matrix peeling failure; the keyway interface is the shear damage of the key-tooth root, and the rest of the keyway showed UHPC surface peeling failure. According to the failure mode, the shear capacity of UHPC keyway adhesive joints under passive restraint is mainly provided by the shear resistance of key teeth, the friction force of the joint surface, and the bonding force of the UHPC surface. The friction coefficient was determined based on the test results, and the high-precision fitting formula between the shear strength of the UHPC surface and the passive constraint force was established. According to the Mohr stress circle theory, the proposed formula for direct shear strength of UHPC bonded joints under passive constraint was established. The average ratio of the proposed UHPC adhesive joint calculation formula to the test results was 0.99, and the standard deviation was 0.027.