A shock-absorbing frame for a bicycle includes a first body, a middle body, a shock-absorbing device, a second body, and two holders. Thus, the middle body and the second body are rotated on the opposite directions, and the drive chain wheel and the driven chain wheel are moved upward and forward simultaneously, so that the distance between the drive chain wheel and the driven chain wheel is kept at a constant, thereby preventing the chain mounted between the drive chain wheel and the driven chain wheel from becoming loosened or detached, so that the chain is mounted between the drive chain wheel and the driven chain wheel rigidly and stably without detachment so as to protect the rider's safety.