This book is about David ruling as king over Israel. He first ruled over the tribe of Judah for seven years. Then the other eleven tribes agreed to have him become their king. He ruled over all Israel for thirty-three years.
It is uncertain who wrote 2 Samuel. It may have been someone alive soon after King Solomon died. When Solomon died, the kingdom of Israel split into two kingdoms. The author probably lived in the southern kingdom of Judah. A descendant of David continued to rule over the southern kingdom. The author may have written 2 Samuel to defend David's right to be king. This would prove that David's descendant was the rightful king of God's people.