"Brother!" the 80-year-old Castro said from his sickbed, his face lighting up as Chavez entered the room and gave him a warm embrace.
"Gentleman of the heroic resistance!" the Venezuelan president responded, with a smile, to his good friend and ally.
"What joy!" Castro said after sitting up. "A million thanks!"
Cuba's state television said the men chatted for about two hours, and Chavez also met with Raul Castro and other Cuban leaders during his stop on the island.
Chavez has now visited Castro three times since the Cuban leader announced on July 31 that he had undergone intestinal surgery and was provisionally ceding power to his brother, Raul Castro, the defense minister.
The specifics of Castro's ailment and the nature of his surgery have been treated as a state secret.
Dressed in what appeared to be a red dressing gown or pajamas, Castro appeared much more animated and alert on the video clips shown Friday night than in those made when Chavez made his first post-surgery visit to the Cuban leader on his 80th birthday on Aug. 13.
During the earlier visit, Castro was more lethargic and didn't even raise his head from the pillow. It was difficult to make out his words.
The Venezuelan president visited Castro a second time during a brief stop in late August before beginning his foreign tour.
On Friday, making what he termed "practically a medical visit," Chavez said, "I note a frank improvement in the patient."
Stopping in Cuba on his way back to Venezuela as he returned from China, Malaysia, Syria and Angola, Chavez told Castro that people in the places he visited were praying for his recovery.
"We all need you," Chavez said as both wrote messages to each other that they later read aloud.
In his message, Castro congratulated Chavez on his foreign visit, saying that he represented "an epoch that has changed, that is new and without precedents" that has created "brilliant, audacious and courageous statesmen with new ideas like you."
Returning to Caracas on Friday, Chavez told his supporters that "Fidel has recovered very much from the illness that he has been suffering."
After Castro announced he was temporarily ceding power to his brother, U.S. officials urged Chavez to help push for democratic changes in Cuba. Chavez argues the United States — not Cuba — needs a transition to democracy.