Preparing your minds for action, and being sober-minded, set your hope fully on the grace that will be brought to you at the revelation of Jesus Christ. As obedient children, do not be conformed to the passions of your former ignorance, but as he who called you is holy, you also be holy in all your conduct, since it is written, "You shall be holy, for I am holy" (1 Peter 1:13-14)
Peter wrote those words to Christians living in exile (1 Peter 1:1) and suffering under the cruelest kind of Satanically-inspired persecution (1 Peter 5:8-9). Their lives were constantly in danger because of their faith; most had already lost all their earthly possessions. Their suffering was multilayered and relentless.
Yet Peter's first concern was their holiness.
He urges them to gird up their minds, and in so doing, he reminds us what spiritual warfare is all about. It is a fight against sin, and it is first and foremost a personal warfare against our own carnal desires. Although we are beset in this world by the enemies of truth and people who would persecute and abuse us, this world is our mission-field, not our battlefield. Rome, and Nero, and the rest of the pagan world are not our main enemies—our own carnal desires are. So that is where Peter focuses our attention.
Here's how Matthew Henry paraphrases verse 13:
You have a journey to go, a race to run, a warfare to accomplish, and a great work to do; as the traveler, the racer, the warrior, and the labourer, gather in, and gird up, their long and loose garments, that they may be more ready, prompt, and expeditious in their business, so do you by your minds, your inner man, and affections seated there: gird them, gather them in, let them not hang loose and neglected about you; restrain their extravagances, and let the loins or strength and vigour of your minds be exerted in your duty; disengage yourselves from all that would hinder you, and go on resolutely in your obedience.
Matthew Henry goes on to say, "The main work of a Christian lies in the right management of his [own] heart and mind; [that's why] the apostle's first direction is to gird up the loins of the mind."
So in the midst of all the dangers these Christians were facing, Peter's first and most important exhortation was a call to personal holiness. It was not that Peter was unconcerned for the temporal welfare of these exiles. The epistle is full of encouragement for them. But even in that, Peter takes the long view and encourages them by reminding them that this life's suffering is temporary while the hoped-for glory is eternal (1 Peter 1:3-4, 7; 4:12-13; 5:10).
Persecution has a purpose, and it is to conform us to the image of Christ. The fires of persecution have a purifying effect, so Peter encourages these believers to rejoice in the midst of their trials. Note verses 6-7: "In this you rejoice, though now for a little while, if necessary, you have been grieved by various trials, so that the tested genuineness of your faith—more precious than gold that perishes though it is tested by fire—may be found to result in praise and glory and honor at the revelation of Jesus Christ."
Pursue that end, he says, by cultivating holiness, starting with your own thought life. That's what the true Christian warfare is all about.