Answer:
The story of David transporting the Ark of the Covenant from Kirjath-jearim to Jerusalem is recorded in the Bible, in the First Book of Samuel, chapter 6. According to the text, David had a righteous motive for bringing the Ark to Jerusalem, as he wanted to establish the city as the center of worship for the Israelites and to bring the presence of God closer to the people.
However, the method that David used to transport the Ark was incorrect. According to the text, he failed to follow the proper protocols for handling the Ark, which was a sacred and holy object. Instead of using the prescribed method of carrying the Ark on poles, as described in the Mosaic law, David had the Ark placed on a new cart pulled by oxen. This resulted in the death of Uzzah, who touched the Ark to steady it when the oxen stumbled, and caused David to become afraid and temporarily abandon the plan to bring the Ark to Jerusalem.
Therefore, it can be concluded that while David had a righteous motive for bringing the Ark to Jerusalem, his method for doing so was incorrect and failed to follow the prescribed protocol for handling the sacred object.