The Bible makes it abundantly clear that God created man and that He created him for His glory (see Isaiah 43:7). Therefore, the ultimate purpose of man, according to the Bible, is simply to glorify God.
A harder question to answer, perhaps, is what does it look like to glorify God? In Psalm 100:2–3, we’re told to worship God with gladness and “know that the Lord is God. It is he who made us, and we are his; we are his people, the sheep of his pasture.” Part of what it looks like to glorify God is to acknowledge who God is (our Creator, for starters) and to praise and worship Him as such.
We fulfill our purpose of glorifying God also by living our lives in relationship and faithful service to Him (see 1 Samuel 12:24 and John 17:4). Since God created man in His image (Genesis 1:27), man’s purpose cannot be fulfilled apart from Him. King Solomon tried living for his own pleasure, yet at the end of his life he concluded that the only worthwhile life is one of honor and obedience to God (see Ecclesiastes 12:13–14).
In our fallen state, sin separates us from God and makes it impossible to glorify Him on our own. But through Jesus Christ’s sacrifice, our relationship with God is reconciled—our sin is forgiven and no longer creates a barrier between God and us (see Romans 3:23–24).
Interestingly, we are able to glorify God because He gave us glory first. David writes in Psalm 8:4–5, “What is mankind that you are mindful of them, human beings that you care for them? You have made them a little lower than the angels and crowned them with glory and honor. You made them rulers over the works of your hands; you put everything under their feet.” (This is also repeated in Hebrews 2:6–8.) This verse reveals another purpose that God has given man: dominion over the earth (see Genesis 1:28–29). Again, though, this can only be properly fulfilled through a right relationship with God.
The more we get to know our Creator and the more we love Him (Matthew 22:37–38), the better we understand who we are and what our purpose is. We were created to bring Him glory. God has unique plans and purposes for each person (Jeremiah 29:11), but we can know that, whatever those plans look like, they will ultimately result in His glory (see Proverbs 3:6 and 1 Corinthians 10:31).
 Got Questions Ministries. (2010). Got Questions? Bible Questions Answered. Bellingham, WA: Logos Bible Software.