The first time Amazon.com tried to buy Zappos, we said no without even thinking.

It was the summer of 2005, and Zappos, the start-up into which I'd poured the past five years of my life (and almost all of my money), finally seemed to be on the right track.

Zappos sells shoes and apparel online, but what distinguished us from our competitors was that we'd put our company culture above all else. We'd bet that by being good to our employees--for instance, by paying for 100 percent of health care premiums, spending heavily on personal development, and giving customer service reps more freedom than at a typical call center--we would be able to offer better service than our competitors. Better service would translate into lots of repeat customers, which would mean low marketing expenses, long-term profits, and fast growth. Amazingly, it all seemed to be working. By 2005, gross merchandise sales were $370 million, and we made the Inc. 500. We weren't profitable yet, but we were close to breaking even, and our revenue was growing quickly.

At the time, we made almost all our money selling shoes, but our hope was that we'd eventually go into all sorts of other businesses. We saw Zappos as a global brand like Virgin--except whereas Virgin was about being hip and cool, Zappos would be about offering the best service. The plan was to grow sales to $1 billion by 2010 and eventually go public.

These ideas about the power of our company culture had yet to be proved. As I talked to Amazon founder and CEO Jeff Bezos, who visited our headquarters in 2005, I realized that to Amazon, we were just a leading shoe company. If we sold, we'd probably be folded into their operations, and our brand and culture would be at risk of disappearing.

That was why we told Jeff that we weren't interested in selling at any price. I felt like we were just getting started.

Four years later, Amazon came calling again--and again my impulse was to say no. Our sales had grown steadily since 2005; by 2008 we were doing more than $1 billion in gross merchandise sales annually--two years ahead of our original plan. We were now profitable, and our culture was even stronger. As before, our plan was to stay independent and eventually go public.

But our board of directors had other ideas. Although I'd financed much of Zappos myself during its early days, we'd eventually raised tens of millions of dollars from outside investors, including $48 million from Sequoia Capital, a

Silicon Valley venture capital firm. As with all VCs, Sequoia expected a substantial return on its investment--most likely through an IPO. It might have been happy to wait a few more years if the economy had been thriving, but the recession and the credit crisis had put Zappos--and our investors--in a very precarious position.

At the time, Zappos relied on a revolving line of credit of $100 million to buy inventory. But our lending agreements required us to hit projected revenue and profitability targets each month. If we missed our numbers even by a small amount, the banks had the right to walk away from the loans, creating a possible cash-flow crisis that might theoretically bankrupt us. In early 2009, there weren't a lot of banks eager to give out $100 million to a business in our situation.

That wasn't our only potential cash-flow problem. Our line of credit was "asset backed," meaning that we could borrow between 50 percent and 60 percent of the value of our inventory. But the value of our inventory wasn't based on what we'd paid. It was based on the amount of money we could reasonably collect if the company were liquidated. As the economy deteriorated, the appraised value of our inventory began to fall, which meant that even if we hit our numbers, we might eventually find ourselves without enough cash to buy inventory.

These issues had nothing to do with the underlying performance of our business, but they increased tensions on our board of directors. Some board members had always viewed our company culture as a pet project--"Tony's social experiments," they called it. I disagreed. I believe that getting the culture right is the most important thing a company can do. But the board took the conventional view--namely, that a business should focus on profitability first and then use the profits to do nice things for its employees. The board's attitude was that my "social experiments" might make for good PR but that they didn't move the overall business forward. The board wanted me, or whoever was CEO, to spend less time on worrying about employee happiness and more time selling shoes.

On some level, I was sympathetic to the board's position. The truth was that if we pulled back on the culture stuff, the immediate effect on our financials would probably have been positive. It would have reduced our expenses in the short term, and I don't think our sales would have suffered much at first. But I was pretty sure that in the long term, it would have ruined everything we had created.

By early 2009, we were at a stalemate. Because of a complicated legal structure, I effectively controlled the majority of the common shares, so that the board couldn't force a sale of the company. But on the five-person board, only two of us--Alfred Lin, our CFO and COO, and myself--were completely committed to Zappos's culture. This made it likely that if the economy didn't improve, the board would fire me and hire a new CEO who was concerned only with maximizing profits. The threat was never made overtly, but I could tell that was the direction things were going.

It was a stressful time for me and Alfred. But we'd gotten through much tougher times before, and this seemed like just another challenge we needed to figure out. We began brainstorming ways that we could get out from under the board. We certainly didn't want to sell the company and move on to something else. To us, Zappos wasn't just a job--it was a calling. So we came up with a plan: We would buy out our board of directors.

We figured to do so would cost about $200 million. As we were talking to potential investors, Amazon approached Alfred about buying Zappos outright. Although that still didn't seem like the best option to me, Alfred sensed that Amazon would be more open than last time to the idea of letting Zappos continue to operate as an independent entity. And we felt that the price Amazon was talking about was too large for us to ignore without potentially violating our fiduciary duty to our shareholders.

In April, I flew to Seattle for an hourlong meeting with Jeff Bezos. I gave him my standard presentation on Zappos, which is mostly about our culture. Toward the end of the presentation, I started talking about the science of happiness--and how we try to use it to serve our customers and employees better.

Out of nowhere, Jeff said, "Did you know that people are very bad at predicting what will make them happy?" Those were the exact words on my next slide. I put it up and said, "Yes, but apparently you are very good at predicting PowerPoint slides." After that moment, things got comfortable. It seemed clear that Amazon had come to appreciate our company culture as well as our strong sales.

Still, I had plenty of concerns. Jeff's approach to business had been very different from my own. One of the ways that Amazon tries to deliver a great customer experience is by offering low prices, whereas at Zappos we don't try to compete on price. If Amazon gets a lot of customer service calls, it will try to figure out why--maybe there's something confusing about the product description--and then it will try to fix the problem so that it can reduce the number of phone calls, which keeps prices low. But at Zappos, we want people to call us. We believe that forming personal, emotional connections with our customers is the best way to provide great service.

But as I talked to Jeff, I realized that there were similarities between our companies, too. Amazon wants to do what is best for its customers--even, it seemed to me, at the expense of short-term financial performance. Zappos has the same goal. We just have a different philosophy about how to do it.

I left Seattle pretty sure that Amazon would be a better partner for Zappos than our current board of directors or any other outside investor. Our board wanted an immediate exit; we wanted to build an enduring company that would spread happiness. With Amazon, it seemed that Zappos could continue to build its culture, brand, and business. We would be free to be ourselves.

Negotiations with Amazon began shortly afterward. Amazon initially offered to buy Zappos in cash, but that didn't sit well with us. In our minds, a cash deal felt too much like we were selling the company outright, so we proposed an all-stock transaction. Zappos shareholders would simply trade their stock for Amazon stock. We saw the deal less as an acquisition than as a marriage. An all-stock deal would be analogous to a married couple opening a joint bank account.

In June, Jeff sent a formal proposal to buy Zappos in stock, which our board voted to accept on July 20. We persuaded Amazon to let us break the news to our managers. So at around noon on July 22, an hour and a half before the markets closed and the deal was publicly announced, I stood in front of about 50 of our most senior employees in our training room and explained what we were doing. It was a speech about the most important thing in my life, and all the nervousness that I used to feel when I first started speaking in public came back.

I spoke for half an hour and told them to explain to their staffs that nothing was going to change: They would still have their jobs, and the Zappos culture would still be our own. But now, we would be able to do new things more quickly.

At first, everyone in the room was anxious--some had assumed I was leaving the company; others didn't know what to think--but as I spoke, I could see the relief come over people's faces. They went back to their desks, gathered their staffs, and told them what was happening. Within a couple of hours, everyone had gone back to work. In the hallways, I overheard employees talking about how excited they were about having access to Amazon's resources. Two days later, I gathered our Las Vegas team--roughly 700 employees at the time--in a conference center to address any additional questions. Party music filled the room, and employees threw beach balls around into the crowd. The energy was amazing. It felt like the beginning of the next leg of our journey.

The acquisition closed on November 1, at a valuation of $1.2 billion (based on Amazon's stock price on the day of closing). Our investors at Sequoia made $248 million. Our board was replaced by a management committee that includes me, Jeff, two Amazon executives, and two Zappos executives. As CEO, I report to the committee every quarter, and Zappos is responsible for hitting revenue and profitability numbers. But unlike our former board of directors, our new management committee seems to understand the importance of our culture--the "social experiments"--to our long-term success. In fact, one Amazon distribution center recently began experimenting with its own version of Zappos's policy of paying new employees $2,000 to quit if they're unhappy with their jobs.

Otherwise, Zappos continues to operate independently. Our relationship is governed by a document that formally recognizes the uniqueness of Zappos's culture and Amazon's duty to protect it. We think of Amazon as a giant consulting company that we can hire if we want--for instance, if we need help redesigning our warehouse systems.

In the first quarter of 2010, net sales at Zappos were up almost 50 percent, and we've added several hundred new employees. The growth has made Amazon very happy, but it's also creating new challenges. I've noticed that at company happy hours, you don't see as many employees from different departments hanging out with one another.

To address that, we've begun tracking employee relationships. When employees log in to their computers, we ask them to look at a picture of a random employee and then ask them how well they know that person--the options include "say hi in the halls," "hang out outside of work," and "we're going to be longtime friends." We're starting to keep track of the number and strength of cross-departmental relationships--and we're planning a class on the topic. My hope is that we can have more employees who plan to be close friends.

That's just one small thing that we're doing to make sure our culture gets stronger and that our employees are happy.

We have close to 1,800 employees now, and I think we're proof that a company doesn't have to lose itself as it grows bigger--or even after it gets acquired.

10 years, $1.2 billion Zappos struggled for years before landing its big payday. A look back at what happened: August 1999: Tony Hsieh invests $500,000 in what is universally considered a bad idea: an online shoe store.

January 2000: Zappos, having been rejected by numerous VCs, is out of money. As employees clean out their desks, Hsieh decides he will keep funding the company. Soon after, he becomes CEO.

October 2000: Six months after the dot-com crash, Zappos is once again out of money. Hsieh lays off half the staff. He sets his own salary at $24.

August 2002: To pay for a new warehouse in Kentucky, Hsieh sells his San Francisco loft. By year's end, sales hit $32 million, but there are still no profits.

March 2004: Hsieh moves the Zappos headquarters from San Francisco to Las Vegas in order to hire more experienced call-center workers.

October 2004: With sales up to $184 million, Zappos persuades Sequoia Capital to inves $20 million.

August 2005: Jeff Bezos flies to Las Vegas and offers to buy the company, which now has sales of $370 million. Hsieh says no.

Jeff Bezos flies to Las Vegas and offers to buy the company, which now has sales of $370 million. Hsieh says no. December 2007: Zappos sells $100 million worth of merchandise in a month, ending the year with sales of $840 million and, for the first time, a profit.

April 2009: Hsieh meets Bezos in Seattle and talks about happiness. Bezos says he is willing to let Zappos operate independently. Negotiations ensue.