An attachment structure of a generator and a working machine including a transmission case; and a PTO shaft protruding from the transmission case, includes a structure body attached to a side of the transmission case from which the PTO shaft protrudes, and includes the generator attached to the structure body.