Walker said he was inspired to write the song after an encounter with a street performer in a New Orleans jail.
While in jail for public intoxication in 1965, he met a homeless man who called himself "Mr. Bojangles" to conceal his true identity from the police.
Mr. Bojangles had been arrested as part of a police sweep of indigent people that was carried out following a high-profile murder.
The two men and others in the cell chatted about all manner of things, but when Mr. Bojangles told a story about his dog, the mood in the room turned heavy. Someone else in the cell asked for something to lighten the mood, and Mr. Bojangles obliged with a tap dance.
The homeless "Mr. Bojangles", who was white, had taken his pseudonym from Bill "Bojangles" Robinson (1878–1949), the best-paid Black entertainer of his era........https://en.wikipedia.org/wiki/Mr._Bojangles_(song)