It happened Thursday morning at a home on the 200 block of Verada Street in Port St. Lucie.
Police say 18-year-old Michael Smeriglio first lied to police saying someone shot him while he was walking down the street. After being questioned by police he admitted to accidentally doing it himself.
Doctors say the bullet went through his penis, his left testicle and then lodged itself in his thigh.
Smeriglio told police he bought the gun last month at a party.
While police were investigating at the home where it happened, they discovered marijuana in the house. That led to the arrest of the homeowner Joseph Lamar James, 22, on drug charges.