The utility model relates to the technical field of vehicles, and discloses a vehicle-mounted table structure and a vehicle. According to the vehicle-mounted table structure, a table locking piece is driven by a driving mechanism to be switched to a locking state, and then a base and a sliding rail can be locked through the table locking piece, so that the vehicle-mounted table structure is fixed in a vehicle cabin, and the stability of the vehicle-mounted table structure is improved; according to the vehicle-mounted table structure, the driving mechanism drives the table locking piece to be switched to the unlocking state, the table locking piece can unlock the base and the sliding rail, then the vehicle-mounted table structure can be disassembled and assembled conveniently, when the vehicle-mounted table structure is not used, the vehicle-mounted table structure can be disassembled and stored, the activity space of a user in a vehicle cabin cannot be occupied, and the use convenience and experience feeling of the user are improved; meanwhile, compared with the prior art, the vehicle-mounted table structure is installed on the sliding rail of the vehicle, the vehicle does not need to reserve an installation point position for the vehicle-mounted table structure, the convenience of dismounting and mounting of the vehicle-mounted table structure is improved, the cost is reduced, the dismounting and mounting time consumption of the table plate can be shortened, and the operation error rate can be greatly reduced.