Objectives: to analyze the knowledge, attitudes, and practices related to sexually transmitted infections of men in prison. Methods: qualitative study, based on the methodology Knowledge, Attitude and Practice, conducted with 30 men in prison. The study applied individual interviews submitted to the analyze of the discourse. Results: the incipient knowledge of men was associated with: self-illness and the others’, diagnosis, and perception of risk behavior, pervaded by distrust or lack of understanding of the rapid test for detection. The attitudes involved culpability of partnerships, non-adherence to prevention inputs, and resistance to look for health services. The practices are linked to health care after the identification of the disease, use of penile condoms, and attention to the partnership. Conclusions: the reduced knowledge about Sexually Transmitted Infections makes attitudes stereotyped, stigmatized, compromised by the level of education. The level of health care and the limits of deprivation of liberty weaken the practices.